【发布时间】:2014-03-08 07:01:25
【问题描述】:
这两张图应该能解释清楚。第一个正常显示我的UITableView。第二个显示当我触摸UISearchBar 并获得焦点时。为什么单元格标题和搜索栏之间有间隙?有谁知道如何解决这个问题?
iOS 7 是这种情况发生的时候。我已经有了这个代码:
- (CGFloat) tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
if (tableView == self.searchDisplayController.searchResultsTableView)
{
return 0;
}
else
{
return 23;
}
}
【问题讨论】:
-
我注意到了同样的问题。你找到解决方案了吗?
标签: ios objective-c xcode cocoa-touch uitableview