簡體   English   中英

performSegueWithIdentifier和popViewControllerAnimated打破屏幕導航

[英]performSegueWithIdentifier and popViewControllerAnimated breaking screen navigation

我有4個ViewController A,B,C,D。我使用從Storyboard創建的Push Segues從A-> B-> C-> D移動。

由於我的應用程序的邏輯,如果用戶想從屏幕D返回,則屏幕C不再有效,我通過使用performSegueWithIdentifier將用戶重定向到屏幕C

問題現在開始-我無法使用[self.navigationController popViewControllerAnimated:YES];從屏幕B-> A移回[self.navigationController popViewControllerAnimated:YES];

我想知道為什么會這樣,如何解決這種情況並修復導航?

您使用的segue類型是什么?

為什么不使用:

- (NSArray *)popToViewController:(UIViewController *)viewController animated:(BOOL)animated

您可以使用UINavigationControllerviewControllers屬性訪問視圖控制器堆棧。

這是關於UINavigationController的Apple文檔

暫無
暫無

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

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