ios – UISearchDisplayDelegate弃用解决方法

ios – UISearchDisplayDelegate弃用解决方法,第1张

概述我注意到基本上所有 UISearchDisplayDelegate中的所有内容都已弃用.就像我被教导实现搜索栏和搜索显示控制器的唯一方式一样,什么是好的解决方法? 示例代码为: - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { if (tableView == 我注意到基本上所有 UISearchDisplayDelegate中的所有内容都已弃用.就像我被教导实现搜索栏和搜索显示控制器的唯一方式一样,什么是好的解决方法?

示例代码为:

- (NSInteger)tableVIEw:(UItableVIEw *)tableVIEw numberOfRowsInSection:(NSInteger)section {    if (tableVIEw == self.searchdisplayController.searchResultstableVIEw) { // 'searchdisplayContoller' is Now deprecated        return [searchList count];    } else {        return [initialList count];    }}
解决方法 UISearchController应该替换它…

分类参考:https://developer.apple.com/library/prerelease/ios/documentation/UIKit/Reference/UISearchController/index.html

Apple关于替换的说明,滚动到UIKit Framework部分:
https://developer.apple.com/library/prerelease/ios/releasenotes/General/WhatsNewIniOS/Articles/iOS8.html

总结

以上是内存溢出为你收集整理的ios – UISearchDisplayDelegate弃用解决方法全部内容,希望文章能够帮你解决ios – UISearchDisplayDelegate弃用解决方法所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1114130.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-29
下一篇 2022-05-29

发表评论

登录后才能评论

评论列表(0条)

保存