我要禁用導航欄動畫狀態欄時,頁面的變化,IOS隱藏與動畫
根的viewController
- (BOOL)prefersStatusBarHidden{
return YES;
}
- (void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:YES animated:animated];,
}
推的viewController
- (BOOL)prefersStatusBarHidden{
return NO;
}
- (void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:NO animated:animated];,
}
如果這兩個網頁statusBarHidden等於否或是這種方法的工作,但當我禁用其中一個問題發生。由於我的聲望很低,我無法上傳圖片,請檢查圖片鏈接。 https://www.facebook.com/photo.php?fbid=154038544933435&set=a.154038594933430.1073741827.100009818700445&type=1&theater
你怎麼推下一個視圖控制器? '[self.navigationController pushViewController:vc animated:NO]' –
like this [[self.navigationController pushViewController:myController animated:YES];' – vayfi
您需要調用[super viewWillAppear:animated];和「動畫:動畫」沒有任何意義,因爲如果你沒有調用超級viewWillApear,那麼這個「antimated」與導航欄 – Loxx