【问题标题】:UISearchDisplayDelegate Deprecation Work-AroundUISearchDisplayDelegate 弃用解决方法
【发布时间】:2014-07-23 12:20:34
【问题描述】:

我注意到UISearchDisplayDelegate 中的所有内容基本上都已弃用。既然这是教我实现搜索栏和搜索显示控制器的唯一方法,那么有什么好的解决方法?

示例代码为:

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    if (tableView == self.searchDisplayController.searchResultsTableView) { // 'searchDisplayContoller' is now deprecated
        return [searchList count];
    } else {
        return [initialList count];
    }
}

【问题讨论】:

    标签: ios objective-c uitableview uisearchbar


    【解决方案1】:

    【讨论】:

    • 谢谢!去挖掘看看是否有任何样本,如果有人感兴趣的话,发现了这个:link
    • @collinhaines 你知道self.searchDisplayController 的替代品是什么吗? self.searchController 说“没有成员 searchController”
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-09-07
    • 2019-08-30
    • 1970-01-01
    • 2016-12-07
    • 1970-01-01
    • 2022-10-26
    相关资源
    最近更新 更多