我試圖用popoverviewcontroller回去到視圖控制器,但沒有任何反應。
首先,我加載第一的ViewController,在AppDelegate中,使用此代碼:popviewcontroller什麼也不做,不工作
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:self.welcomeMenu];
nav.navigationBarHidden = YES;
self.window.rootViewController = nav;
nav = nil;
的的導航欄被隱藏,因爲我需要它以這種方式
在這個視圖控制器,我顯示一個菜單帶有按鈕,然後,展現另一個ViewController中,我使用這個代碼:
SecondViewController *secView = [[SecondViewController alloc]initWithNibName:@"SecondViewController" bundle:nil];
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationDuration:0.75];
[self.navigationController pushViewController:secView animated:NO];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.navigationController.view cache:NO];
[UIView commitAnimations];
secView = nil;
而且SecondViewController負載(但是旋轉不工作)...
我SecondViewController代碼中SplitViewController增加(與NavigationCon troller左側的表,而另一個NavigationController另一個右表)
然後,在SecondViewController,我加入手動按鈕回去,使用此代碼:
[self.navigationController popViewControllerAnimated:NO];
,但沒有發生...... 當我打印self.navigationController,輸出爲(空),所以我想這是問題,但爲什麼我的self.navigationController爲空?我需要做些什麼才能正確彈出?
如果我不隱藏的導航欄在AppDelegate中的代碼,在返回按鈕出現自動工作正常,但是當我想這樣做,手動,沒有工作...
嘗試改變束:無捆綁:[一個NSBundle mainBundle] –
什麼也沒有發生仍然 – user1600801