[英]Showing UINavigationController in a Modal segue (ViewController)?
[英]Unwind a Modal UINavigationController to another ViewController
在模擬呈現UINavigationController
並使用root ViewController
之后,我試圖再次回到另一個UIViewController
。 我想要發生的是一個按鈕從UINavigationController
的根VC中展開並返回到呈現它的初始UIViewController
。 我在目標VC中編寫了unwind方法,並且按鈕連接到VC的Exit點。 但是當我按下按鈕時,沒有任何反應。 誰能解釋我做錯了什么? 任何建議表示贊賞。
故事板:
碼:
-(IBAction)unwindToClockView:(UIStoryboardSegue*)sender;
{
NSLog(@"Back to Clock View");
}
其他代碼可以在這里找到: https : //github.com/xinkecf35/TrafficAlarmClock
好的,我有一個解決方案。 它只是通過以完全取消視圖控制器的按鈕以編程方式調用方法觸發器。 方法如下。
-(IBAction)dismissSettings:(id)sender
{
[self dismissViewControllerAnimated:TRUE completion:nil];
}
如果任何人都可以提供使用Storyboard的解決方案,我們將不勝感激。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.