简体   繁体   English

如何在Xcode 4.4中将屏幕从应用程序委托导航到viewController

[英]how to navigate the screen from app delegate to viewController in xcode 4.4

I am using xcode 4.4 on os x 10.7,in any version if we give the navigation controller in the appdelegate the screen will navigate to the what ever the viewcontroller we have given.But in Xcode 4.4 its not navigating and its showing empty view controller.And in that view controller also i am not able to navigate to another view controller by using giving the action to the button. 我在os x 10.7上使用xcode 4.4,在任何版本中,如果我们在appdelegate中提供导航控制器,屏幕将导航到我们给定的viewcontroller。但是在Xcode 4.4中,它无法导航并且显示为空视图控制器。而且在该视图控制器中,我也无法通过使用按钮操作来导航到另一个视图控制器。

Thanks in advance for any help. 在此先感谢您的帮助。

The app delegate never appears on the screen... It has the window property which refers to the screen. 应用程序委托永远不会出现在屏幕上...它具有引用屏幕的window属性。 What i would suggest doing is initializing a view controller, then initialize a navigation controller and set the rootviewcontroller property of that to the view controller you created earlier. 我建议做的是初始化一个视图控制器,然后初始化一个导航控制器,并将其rootviewcontroller属性设置为您先前创建的视图控制器。 Then in the applicationDidFinishLaunchingWithOptions method in the app delegate, do [self.window setRootViewController: nameOfYourNavigationController ]; 然后在应用程序委托的applicationDidFinishLaunchingWithOptions方法中,执行[self.window setRootViewController: nameOfYourNavigationController ] ;。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从app delegate访问viewController属性 - Accessing viewController properties from the app delegate 从App Delegate执行,导航到子视图 - Performe, navigate, to child view from App Delegate 如何从Appdelegate导航到另一个viewcontroller - How to navigate from Appdelegate to another viewcontroller 如何在基于窗口的iPhone应用程序中从应用程序委托类进行导航。 如何在应用程序委托类中编写pushViewcontroller方法 - How to navigate from app delegate class in window based iPhone application. How to write pushViewcontroller method in app delegate class iOS:导航到未直接与应用程序委托连接的视图控制器 - iOS: navigate to a view controller not directly connected from the app delegate 如何在Xcode3中的现有ViewController之前添加登录屏幕 - how to add a login screen before existing ViewController in Xcode3 如何从主视图控制器创建静态委托? - How to create a static delegate from main-viewcontroller? 应用程序委托是否应将ViewController的全局实例所有 - Should a global instace of a viewcontroller be owned by app delegate Xcode 6 ViewController的内容小于模拟器的屏幕 - Xcode 6 ViewController content is smaller than the simulator screen iOS将值从App Delegate传递到初始ViewController,并在viewWillAppear中使用这些值 - IOS pass values from App Delegate to initial viewcontroller and use those values in viewWillAppear
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM