应用程序从delegate viewcontroller开始

时间:2013-10-21 08:48:13

标签: ios objective-c uiviewcontroller launch appdelegate

我有四个UIViewController用于显示不同的目的。如果我启动应用程序,它会显示委托功能。如果我去第二或第三个视图控制器然后关闭应用程序。再次打开应用程序,它会显示第三个或第二个viewcontroller。我需要从代表处启动应用程序。怎么办?

2 个答案:

答案 0 :(得分:1)

在plist文件中再添加一个字段

应用程序不在后台运行:make it true

enter image description here

答案 1 :(得分:1)

只需将您的导航控制器弹出到 applicationDidBecomeActive 方法中的根视图。

- (void)applicationDidBecomeActive:(UIApplication *)application
{
    // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
    [navigationCtrl popToRootViewControllerAnimated:NO];
}
相关问题