【发布时间】:2014-09-03 14:33:15
【问题描述】:
我有适用于 iOS7 及以下版本的工作应用程序
我使用 UISearchDisplayController 在表格中进行搜索。
问题:
iOS8 中不显示搜索头后视图。
如下图所示。
搜索前:
搜索后:
我尝试使用 UISearchController 但也有同样的问题 我使用此代码link
我在 TPSMastreViewController.m 中添加以下代码
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
UIView *v = [[UIView alloc] init];
v.backgroundColor = [UIColor greenColor];
return v;
}
我检查了那个委托 - (UIView *)tableView:(UITableView *)tableView
viewForHeaderInSection:(NSInteger)section
在 iOS8 的情况下不调用。
编辑:
我的理解是只有 UITableViewDataSource 委托被调用, UITableViewDelegate 没有。
请不要我在 ViewDidLoad 中设置了两个委托
问题:
1] 是 UI 变化吗?
2]任何人都有补丁,以便委托方法将强制调用。
【问题讨论】:
标签: ios8 xcode6 uisearchdisplaycontroller uisearchcontroller