ios - navigationController is always nill -


i using https://github.com/john-lluch/swrevealviewcontroller side menu in ios app, have logoff 1 of menu item. when click item executing following code snippet.

if(varview==4){             println("tologin")     self.navigationcontroller?.dismissviewcontrolleranimated(true, completion: nil)      if let navcontroller = self.revealviewcontroller().navigationcontroller {         navcontroller.popviewcontrolleranimated(true)     }     else{         println("there no vc")     }     //if let navcontroller = self.navigationcontroller {         //navcontroller.popviewcontrolleranimated(true)     //}     //else{         //println("there no vc")     //}    //self.revealviewcontroller().revealtoggleanimated(true)    //// self.revealviewcontroller().navigationcontroller?.poptoviewcontroller(loginviewcontroller() uiviewcontroller, animated: true)    //                        self.revealviewcontroller().navigationcontroller?.popviewcontrolleranimated(true) } 

always getting there no vc result. highly appreciated. want show loginviewcontroller after logoff.

try taking out line self.navigationcontroller?.dismissviewcontrolleranimated(true, completion:nil) instead of using navcontroller.popviewcontrolleranimated(true), try using navcontroller.poptorootviewcontroller() @ problem further, file on github link? there 4 different projects has there.


Comments

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

android - How to create dynamically Fragment pager adapter -

1111. appearing after print sequence - php -