[英]Goto a detail view in navigationcontroller storyboard from AppDelegate
[英]Linking NavigationController to the AppDelegate using storyboard
我是新手,正在使用情節提要。.我從一個簡單的空應用程序開始,添加了一個新的情節提要。 創建了一個具有viewController的UINavigationController
。 我的問題是如何將iDar從AppDelegate
鏈接到UINavigationController
。 任何指針。
兩種選擇:
1-訪問AppDelegate(不是一個好習慣)
YourAppDelegate* appDelegate= (YourAppDelegate*)[[UIApplication sharedApplication]delegate];
yourObj = appDelegate.obj;
2-在AppDelegate
引用YourMainViewController
(這是UINavigationController
的頂部視圖控制器),並在那里設置其屬性。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.