Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在某些情况下[[ UIApplication sharedApplication] keyWindow ]返回nil。
[[ UIApplication sharedApplication] keyWindow ]
nil
在某些设备上,它经常发生,但通常是零星的
有人知道它会返回零的原因吗?
...当发生从一个窗口到另一个窗口的转换时,我想。用户看不到任何过渡,但它们确实发生了。
在 iPhone OS 2.0 到 iPhone 3.1.3 中,一个示例是在您将消息发送play到MPMoviePlayerController实例之后立即:
play
MPMoviePlayerController
[[[MPMoviePlayerController alloc]initWithContentURL:[@"http://someurl"]]play];
可能还有其他情况。