我使用 Xib 设计了一个 UITableviewCell。当单击按钮时,单元格有一个按钮,它应该移动到另一个视图控制器。我已经编写了委托方法来触发 viewController 中的函数,在函数中,我使用了 PushViewController 但它没有移动到另一个 ViewController 那么如何解决呢?另外,我在项目中通过 Embaded 将 UINavigationController 包含为 RootViewController。点击时按钮触发以下方法。
func showMoreAboutLeads(index: IndexPath)
{
print("Show_More_About_Leads:",index)
let detailController = self.storyboard?.instantiateViewController(withIdentifier: "DetailsLeadController") as! DetailsLeadController
detailController.leadsDetail = self.leadsArray[index.row] as! NSDictionary
self.navigationController?.pushViewController(detailController, animated: true)
}