![](/img/trans.png)
[英]ios/xcode/objective-c: Segue to modal view controller embedded in navigation controller
[英]Objective-C 'Could not find a navigation controller for segue 'SegueIdentifier'
我在這里有這個錯誤:
'Could not find a navigation controller for segue 'SegueIdentifier'. Push segues can only be used when the source controller is managed by an instance of UINavigationController.'
對於這一行代碼:
- (void)viewDidLoad {
[super viewDidLoad];
[self performSegueWithIdentifier: @"SegueIdentifier" sender: self];
}
我不明白,因為我確實在情節提要中將UI鏈接到UINavigation Controller。...請幫助。
如果源視圖控制器已經由UINavigationController管理,則只能使用push
選擇。 如果不是,那么您需要使用諸如modal
或replace
的segue。 推薦的方法是使用一個show
自適應賽格瑞因為這將正常工作,無論你的源是否是由一個UINavigationController或不管理。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.