什么情况下[ [ UIApplication sharedApplication ] keyWindow ]会返回nil?

发布于 2024-09-04 20:54:37 字数 150 浏览 3 评论 0原文

在某些情况下,[[ UIApplication sharedApplication] keyWindow ] 返回nil

在某些设备上,它经常发生,但一般来说,它是零星的

有人知道它会返回零的原因吗?

In some cases [[ UIApplication sharedApplication] keyWindow ] returns nil.

On some devices it's happening pretty often but in general it's sporadic

Anyone know the reasons it would return nil?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

野侃 2024-09-11 20:54:37

...我想,当发生从一个窗口到另一个窗口的转换时。用户看不到任何转换,但它们确实发生了。

在 iPhone OS 2.0 到 iPhone 3.1.3 中,一个示例是在您将消息 play 发送到 MPMoviePlayerController 实例后立即执行:

[[[MPMoviePlayerController alloc]initWithContentURL:[@"http://someurl"]]play];

还可能存在其他情况。

...When happens a transition form one window to another, i suppose. Users can't see any transitions, but they happen.

In iPhone OS 2.0 to iPhone 3.1.3, one example is immediately after you sent the message play to a MPMoviePlayerController instance:

[[[MPMoviePlayerController alloc]initWithContentURL:[@"http://someurl"]]play];

There might be also other situations.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文