开发者

UITableView won't scroll with a UISearchBar

This should be a fairly general question, but I have a view in which I placed a UITableView and implemented it properly. It works well and it scrolls. But I 开发者_StackOverflow社区want to add a UISearchBar attached to it so that it will scroll along with the table. But when I add the search bar onto the tableview it shows up, but the tableview will not scroll anymore. I don't actually need any input into the search bar, and I disabled user interaction. Is there any way to add the search bar (no need to implement it) and have it scroll?

(I will rate up anyone who answers!)

Thanks


The UISearchBar should be the UITableView's header view.


Had similar issue even when IB had the correct bouncing properties enabled.

In your viewDidLoad, set self.tableView.alwaysBounceVertical = YES;.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜