How to reload view when application becomes active after suspended?
When the user changes NsuserDefaults in settings on the iPhone and activates my app after it being suspended, i want to reload the active view.
How can i do this?开发者_开发问答
You could implement the applicationDidBecomeActive: method in your application delegate, or register for the UIApplicationDidBecomeActiveNotification
notification in any other object.
- (void)applicationWillEnterForeground:(UIApplication*)application
on the App Delegate is invoked when coming out of suspend.
Implement this method, in it check if the setting you are about has changed, find your topmost view controller and reload it's view then.
精彩评论