[英]When I search , Button action in Cell don't work
在我的应用程序中,我使用了XLPagerTabStrip ! 图书馆。
在我的HomeView控制器中,我有3个子视图,在NavigationController中使用相同的searchBar。
在我的ChildOneController中,我有一个tableView列出了视频。
我在TableViewCell中有一个按钮。 当我单击此按钮时,为pushviewController。 但是,当我搜索并单击此按钮时,按钮不起作用。
这是我的代码:
func joinBtnDelegate(at index: IndexPath) {
if let jlist = self.joinAllAllowedInnoList , !jlist.isEmpty{
Dataholder.sharedInstance().selectedJoin = jlist[index.row]
let vc = self.storyboard?.instantiateViewController(withIdentifier: "PickVideoViewController") as! PickVideoViewController
self.navigationController?.pushViewController(vc, animated: true)
}
}
有什么建议吗?
确保在下面的代码行中navigationController
不应为nil
。
self.navigationController?.pushViewController(vc, animated: true)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.