簡體   English   中英

Objective-C'找不到Segue'SegueIdentifier'的導航控制器

[英]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選擇。 如果不是,那么您需要使用諸如modalreplace的segue。 推薦的方法是使用一個show自適應賽格瑞因為這將正常工作,無論你的源是否是由一個UINavigationController或不管理。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM