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:
精彩评论