Swift 在搜索栏(ModernSearchBar)后重新加载tableview
我已在我的应用程序(Modernsearchbar)上成功设置此pod 当我在tableview上搜索时,它会正确检索结果(它成功启动了此函数) 但我不知道如何返回到我的Tableview,只返回结果(重新加载我的Tableview) 当我尝试时,我不能拒绝现代搜索栏 如果有人有任何线索,我想:Swift 在搜索栏(ModernSearchBar)后重新加载tableview,swift,uitableview,uisearchbar,Swift,Uitableview,Uisearchbar,我已在我的应用程序(Modernsearchbar)上成功设置此pod 当我在tableview上搜索时,它会正确检索结果(它成功启动了此函数) 但我不知道如何返回到我的Tableview,只返回结果(重新加载我的Tableview) 当我尝试时,我不能拒绝现代搜索栏 如果有人有任何线索,我想: 选中我的结果并关闭modernSearchBar 或 关闭modernSearchBar并仅使用搜索结果重新加载我的TableView 提前感谢,我在这里读了很多书,但没有找到任何解决方案。如果
- 选中我的结果并关闭modernSearchBar
- 关闭modernSearchBar并仅使用搜索结果重新加载我的TableView
提前感谢,我在这里读了很多书,但没有找到任何解决方案。如果有人有此问题,请提供帮助:
My_ModernSearch.searchBarCancelButtonClicked(My_ModernSearch)
对于复选标记,请使用以下选项:
for x in (0..<totalNumberOfRows).reversed() {
let indexPath = IndexPath(row: x, section: 0)
let cell = MyFriendsTableview.cellForRow(at: indexPath)
var MyFriendsLine: MyFriendsModel
MyFriendsLine = self.MyFriendslist[indexPath.row]
if(MyFriendsLine.field1 == item.title) {
if cell?.accessoryType == .checkmark {
cell?.accessoryType = .none
}
else {
cell?.accessoryType = .checkmark
}
对于x英寸(0。。
for x in (0..<totalNumberOfRows).reversed() {
let indexPath = IndexPath(row: x, section: 0)
let cell = MyFriendsTableview.cellForRow(at: indexPath)
var MyFriendsLine: MyFriendsModel
MyFriendsLine = self.MyFriendslist[indexPath.row]
if(MyFriendsLine.field1 == item.title) {
if cell?.accessoryType == .checkmark {
cell?.accessoryType = .none
}
else {
cell?.accessoryType = .checkmark
}