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 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
UISearchBar应该是UITableView的标题视图。
Had similar issue even when IB had the correct bouncing properties enabled.
In your viewDidLoad, set self.tableView.alwaysBounceVertical = YES;
.