我正在为 ios5 构建一个应用程序,但遇到以下问题:
在ios4中,当我需要在应用程序启动时呈现登录模态视图时,我执行以下操作: 在 AppDelegate 中,我使用引用的 View Controller 在方法 didFinishLaunchingWithOptions 中加载它。
@interface MyAppDelegate : NSObject <UIApplicationDelegate, UITabBarControllerDelegate,LoginViewControllerDelegate> {
UIWindow *window;
UITabBarController *tabBarController; //THIS
UIView *splashView;
User *user;
}
但是现在,在使用 Storyboard的 ios5 中,我找不到如何执行此操作,因为在我的 AppDelegate 中我没有任何对任何 View Controller 的引用,而且我不知道如何获取它们。
对此有什么想法吗?
谢谢
最佳答案
但是为什么不在 MainStoryboard 中添加一个新的 Tabviewcontroller 呢? 使用 Storyboard比在 AppDelegate 中编写代码容易得多。
关于iphone - iOS 5 使用 App Delegate 加载模态框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7295005/