views:

22

answers:

1

My iPhone app tends to 'freeze up' the UI when comes into the active state from the background. How can I use Instruments to find out the cause of the freeze? What instrument should I use? What are the key columns I need to look at in the Instruments panel?

+1  A: 

As app goes into background, system makes a screenshot of current UI. That screenshot is displayed when the app becomes active, for as long as the AppDelegate's methods (applicationDidBecomeActive...) executes.

If, on waking up, you want to run some long-running action, consider running it in a background thread. Do not execute synchronous network connections. If your UI depends on this processing, consider showing modal view-controller with some "Please wait..." kind of message.

You do not need Instruments for this analysis, simply run the app in debuger, and pause debugging while it's "frozen". Examine stack traces.

Michal