1

到目前为止,互联网上还没有出现这种发生在我身上的状态恢复警告:

-[UIViewController(StateRestoration) decodeRestorableStateWithCoder:]: Warning - State Restoration for UIViewController has presented view controller, but view controller is either not in a window, or the window is hidden. Deferring presentation which might cause flashing when presentation is made after a turn of the run loop:
self: <SomeTabBarController: 0x16e91220>, presented view controller: <UINavigationController: 0x16dbe260>

TabBarController 有一个视图,它将 ViewController (vc1) 推送到导航控制器上。VC1 然后以模态方式将 NavigationController 推送到自身上,它有自己的一系列视图控制器,从 vc2 开始。

当状态恢复时,它会闪回到 vc1(从 vc2 的快照),然后最终再次实时显示 vc2。

如果有人对我什至可以从哪里开始研究这个有任何想法,那将是一个很大的帮助。

4

1 回答 1

1

我设法通过使窗口键在application:willFinishLaunchingWithOptions:.

- (BOOL)application:(UIApplication *)application willFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    [self.window makeKeyAndVisible];
    return YES;
}
于 2014-05-21T08:34:49.393 回答