私が持っている2つのビューを除いて、どこでもうまく動作する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)
}
}
なぜそれが機能しないのですか?