gpt4 book ai didi

swift - 如何使 UITableViewController 符合 UISearchResultsUpdating 协议(protocol)?

转载 作者:搜寻专家 更新时间:2023-10-30 22:01:21 25 4
gpt4 key购买 nike

我有一个 UITableViewController 类,我在其中实现了一个 UISearchController。我添加了以下代表:

class EmployeesTableView: UITableViewController, NSFetchedResultsControllerDelegate,UISearchResultsUpdating{

我正在导入 UIKitCoreData。我收到以下错误:

"Type 'CustomTableViewController' does not conform to protocol UISearchResultsUpdating"

我需要做什么才能使 Controller 符合协议(protocol)?

最佳答案

swift 3:

func updateSearchResults(for searchController: UISearchController) {

// code here

}

关于swift - 如何使 UITableViewController 符合 UISearchResultsUpdating 协议(protocol)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28522338/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com