{"action":"created","issue":{"url":"https://api.github.com/repos/ykyouhei/KYDrawerController/issues/25","labels_url":"https://api.github.com/repos/ykyouhei/KYDrawerController/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/ykyouhei/KYDrawerController/issues/25/comments","events_url":"https://api.github.com/repos/ykyouhei/KYDrawerController/issues/25/events","html_url":"https://github.com/ykyouhei/KYDrawerController/issues/25","id":114019074,"number":25,"title":"PopToRootViewController","user":{"login":"Ritooon","id":2474167,"avatar_url":"https://avatars.githubusercontent.com/u/2474167?v=3","gravatar_id":"","url":"https://api.github.com/users/Ritooon","html_url":"https://github.com/Ritooon","followers_url":"https://api.github.com/users/Ritooon/followers","following_url":"https://api.github.com/users/Ritooon/following{/other_user}","gists_url":"https://api.github.com/users/Ritooon/gists{/gist_id}","starred_url":"https://api.github.com/users/Ritooon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ritooon/subscriptions","organizations_url":"https://api.github.com/users/Ritooon/orgs","repos_url":"https://api.github.com/users/Ritooon/repos","events_url":"https://api.github.com/users/Ritooon/events{/privacy}","received_events_url":"https://api.github.com/users/Ritooon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-29T10:17:38Z","updated_at":"2015-11-02T16:34:35Z","closed_at":null,"body":"Hi guys !\r\n\r\nIt's me again. I tried to put a row in my tableView in the menu to perform a log out.\r\nSo I do that : \r\n\r\n`self.navigationController?.popToRootViewControllerAnimated(true)` \r\n\r\nBut it doesn't work. I tried to put a button, in the navigation bar, it worked.\r\n\r\nI don't know how to manage :/\r\n\r\n**EDIT** : In fact, I can't access to the navigationController, because when I perform `print(self.navigationController?.viewControllers)`, it returns `nil`\r\n\r\nCheers"},"comment":{"url":"https://api.github.com/repos/ykyouhei/KYDrawerController/issues/comments/153075584","html_url":"https://github.com/ykyouhei/KYDrawerController/issues/25#issuecomment-153075584","issue_url":"https://api.github.com/repos/ykyouhei/KYDrawerController/issues/25","id":153075584,"user":{"login":"hardikdevios","id":6657591,"avatar_url":"https://avatars.githubusercontent.com/u/6657591?v=3","gravatar_id":"","url":"https://api.github.com/users/hardikdevios","html_url":"https://github.com/hardikdevios","followers_url":"https://api.github.com/users/hardikdevios/followers","following_url":"https://api.github.com/users/hardikdevios/following{/other_user}","gists_url":"https://api.github.com/users/hardikdevios/gists{/gist_id}","starred_url":"https://api.github.com/users/hardikdevios/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hardikdevios/subscriptions","organizations_url":"https://api.github.com/users/hardikdevios/orgs","repos_url":"https://api.github.com/users/hardikdevios/repos","events_url":"https://api.github.com/users/hardikdevios/events{/privacy}","received_events_url":"https://api.github.com/users/hardikdevios/received_events","type":"User","site_admin":false},"created_at":"2015-11-02T16:34:35Z","updated_at":"2015-11-02T16:34:35Z","body":"ok first of all to access the Drawer you just have to write this in your menu class \r\n\r\n       if let drawerController = navigationController?.parentViewController as? KYDrawerController {\r\n                 \r\n             if let navigationObj =  drawerController.mainViewController as? UINavigationController {\r\n                    //Pop To rootView Here \r\n             }\r\n    \r\n       }\r\n##### i hope this will fix the issue to pop the screen to rootView controller"}}