开发者

UITableView fixed header

How to disable scrolling for UITableView header, to be always visible? (To h开发者_StackOverflowave column titles.)


I am not sure if I am getting what you mean, are you using a UITableViewController?

If you want to have a header that is not scrollable maybe you can try to put a UIView at the top of your tableview and add sublayers to it as needed.

If a tableview with multiple fixed section headers is what you want, I would suggest using different tableviews and adding UIViews on top of each one for the header.

For handling delegate and datasource use NSObject's - (BOOL)isEqual:(id)anObject .

For example:

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{

  if ([tableView isEqual:markosFirstTableView])
  {
     return 1; 
  }

  else 
  {
     return 5;
  }

}

Does this help?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜