我在我的 UITableView.tableHeaderView 中放置了一个 UISearchBar。然而,它通过将可视顶部放置到第一节标题来覆盖 searchBar。当我向下拖动 tableView 时,我只能看到 searchBar。它被覆盖了一半,然后无法选择,因为释放 tableView 滚动会将橡皮筋带回视野之外。请帮忙。
以下内容放在我的 UITableViewController viewDidLoad 方法中:
UISearchBar *theSearchBar = [[UISearchBar alloc] init];
theSearchBar.delegate = self;
self.searchBar = theSearchBar;
[theSearchBar release];
self.tableView.tableHeaderView = self.searchBar;
结果如下截图:http: //imagebin.ca/view/6qNiwHR.html