我在我的iOS应用程序中使用https://github.com/John-Lluch/SWRevealViewController作为侧边菜单,我有注销作为菜单项之一。当我点击这个项目时,我正在执行以下代码片段。navigationController始终为零
if(varView==4){
println("toLogin")
self.navigationController?.dismissViewControllerAnimated(true, completion: nil)
if let navController = self.revealViewController().navigationController {
navController.popViewControllerAnimated(true)
}
else{
println("There is no vc")
}
//if let navController = self.navigationController {
//navController.popViewControllerAnimated(true)
//}
//else{
//println("There is no vc")
//}
//self.revealViewController().revealToggleAnimated(true)
//// self.revealViewController().navigationController?.popToViewController(LoginViewController() as UIViewController, animated: true)
// self.revealViewController().navigationController?.popViewControllerAnimated(true)
}
总是我得到没有VC结果。任何帮助将不胜感激。我只想显示LoginViewController后注销。
你的教程是目标c和您使用SWIFT – BHUMICA
@Bhumica我跟着https://www.youtube.com/watch?v = 8EFfPT3UeWs,它解释了如何在swift中使用https://github.com/John-Lluch/SWRevealViewController。 – Gunaseelan