0

在我的應用程序中,我有一個UITabBarController,其中包含UINavigationController的4個選項卡。從UINavigationController之一的根VC中,當用戶從表中選擇一些內容時,我推送一個新的UIViewController。從這個細節觀看模式的看法,可以提出這樣的:iOS UINavigationBar在呈現UIViewController後會損壞

PlayerViewController *playerViewController = [[PlayerViewController alloc] initWithNibName:@"PlayerViewController" bundle:nil]; 
playerViewController.videoURL = videoURL; 
[self presentViewController:playerViewController animated:YES completion:nil]; 

如果模式的看法是不提供的應用程序的功能就好了,但如果我提出從推IUViewController那麼該模式的看法時IUViewController被彈出在UINavigationBar損壞,下一次視圖推我得到這個:

nested push animation can result in corrupted UINavigationBar 

我檢查,以確保細節視圖沒有被推多次,我想不出什麼原因這個。

+0

前設置playerViewController.modalPresentationStyle = .CurrentContext您是否嘗試過使用'pushViewController',而不是'presentViewController'?問題是否發生? – 2015-03-19 04:33:41

+0

Umang Bista,我剛剛嘗試過,但確實有效,但我需要以模態方式呈現此視圖,以便標籤和導航欄不再可見。 – harryisaac 2015-03-19 04:37:10

+0

您正在使用哪個版本的iOS?模擬器還是設備? [找到這個鏈接](https://github.com/TeehanLax/UIViewController-Transitions-Example/issues/5)和[來自RayWenderlich](http://www.raywenderlich.com/forums/viewtopic.php?f = 2&t = 9783) – 2015-03-19 04:44:46

回答

0

嘗試呈現視圖控制器