【发布时间】:2014-11-09 05:47:21
【问题描述】:
所以我在 iOS7 中有一个完整的工作解决方案,它通过 AppDelegate 的 didFinishLaunching 中的 presentViewController 显示一个 LoginViewController。
基本上我在做这样的事情:
UIViewController *backgroundViewController = ...
self.window.rootViewController = backgroundViewController;
[self.window makeKeyAndVisible];
[self.window.rootViewController presentViewController:loginViewController
animated:NO ...]
在 iOS8 中,我看到了跳跃。首先我看到 backgroundViewController 然后大约 1 秒后出现登录。
那么,如何在 iOS8 中防止这种跳转?
我看到这是developers 中的a ton 和这个kind of problem,但仍然没有找到解决方案。
【问题讨论】:
-
您找到解决方案了吗?我在 iPhone 5S 上的 iOS 8 上看到了同样的问题。但 Xcode 6 模拟器在 iPhone 6/6+ 模拟器上显示正常动画。
-
也在寻找解决方案
-
模拟器也有这个问题,但是你看的不是那么清楚,因为它更快。我找到的唯一解决方案是通过容器视图控制器自己创建该动画。但是,我的解决方案与 tabviewcontrollers 有一些问题:/(当我们更改 viewcontrollers 时不会调用 viewDidAppear)
-
我有同样的问题,经过一番调查,我发现,在我的情况下,最好的解决方案不是呈现 loginViewController,而是设置 self.window.rootViewController = loginViewController。当我需要关闭 loginViewController 时,我正在设置 self.window.rootViewController = backgroundViewController。我不喜欢这个解决方案,但它确实有效。
-
@somedev 我最终选择了这条路线,添加了一个通知 loginWillComplete 我切换了 rootViewController,然后继续我的登录过程。像魅力一样工作。
标签: ios8 appdelegate presentviewcontroller