This is for iOS4 with multitask issue. How do I reload view after my app is re-appear from background running app?
A:
You want your view controller to listen for UIApplicationWillEnterForegroundNotification
:
Posted shortly before an application leaves the background state on its way to becoming the active application.
Also mentioned in the iOS Application Programming Guide:
The
UIApplicationWillEnterForegroundNotification
notification is also available for tracking when your application reenters the foreground. Objects in your application can use the default notification center to register for this notification.
In your handler for this notification, you can trigger whatever refreshing/redrawing you need.
You can read more about Notifications in the Cocoa Core Competencies document.
Shaggy Frog
2010-08-06 05:35:21
That's what I'm looking for. Thanks so much!
Quy
2010-08-06 06:46:59