我正在使用 MMDrawerController,它在任何地方都可以正常工作,除了在我拥有的两个视图上self.navigationController?.navigationBarHidden = true
。在这些视图中,我可以打开滑块,但无法关闭它,按钮不再响应。这是我在滑块中的代码:
let viewController = self.storyboard?.instantiateViewControllerWithIdentifier("ProfileViewController") as! ProfileViewController
viewController.currentUser = APP_DELEGATE.loggedInUser
let navigationController = self.mm_drawerController.centerViewController as! UINavigationController
navigationController.viewControllers = [viewController]
self.mm_drawerController.toggleDrawerSide(MMDrawerSide.Left, animated: true, completion: nil)
以及隐藏导航栏的个人资料页面上的一个:
@IBAction func menuTapped(sender: AnyObject) {
println("Profile: menu tapped")
if let drawer = self.mm_drawerController
{
drawer.toggleDrawerSide(MMDrawerSide.Left, animated: true, completion: nil)
}
}
知道为什么它不起作用吗?