开发者

How to ensure Search bar sticks to the top in iPhone SDK?

I have a table view along with search bar.

I want to ensure that while scrolling the tableview, the searchbar stays on top -开发者_如何学运维 always.

How can this be achieved?


I suggest you to Keep both of them separated.


You have to return your search bar in the table's delegate callback

- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section

Note: don't forget to implement tableView:heightForHeaderInSection:

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜