Short-term UI freeze on applicationWillEnterForeground
I have an app which requires input when resuming from inactive state (a security view). When resuming from inactive after some time, the UI will freeze for 1-5 seconds before entry can take place on the security view. Following this with Instruments, I see some views have been dealloc'd when memory is needed for other apps. Works as it's supposed to.
The UI freeze appears to happen when lots has been dealloc'd, and the app is reconstituting the dealloc'd views. I'm seeing viewDidLoad's fire etc. Trouble is, the security view has already appeared, giving the user the expectation they can enter their passcode.开发者_StackOverflow社区 The app is temporarily unresponsive, which is disconcerting to the user.
I would like to deal with this better, perhaps displaying the security view only when the app is ready for user input.
What's a good way to do that, or is there another suggestion?
Have you included a screenshot of this view as the launch image? It's possible that while the app is loading, it's just showing this screenshot, and giving the impression that the app is frozen, as it won't allow user input on the screenshot.
精彩评论