开发者

iOS UITableViews - moving header of a section off screen

I have a UITableView with a header. When I scroll in the section that does not fit all its elements on the screen, I'd like the header to move off screen instead of the normal behavior of staying on top until it is replaced by another section.

Is this doable? I would like to avoid making the header a UITableView row like the elements within the se开发者_JS百科ction.

Thanks!


As aBitObvious suggested, use a Grouped Tableview to achieve the section header going off affect. Getting the background clear which is what I require for my project required a bit of searching because there is one critical line that is not so intuitive.

self.tableview.backgroundColor = [UIColor clearColor];
self.tableview.opaque = NO;
self.tableview.backgroundView = nil; // THIS ONE TRIPPED ME UP!
self.tableview.separatorColor = [UIColor clearColor];
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜