开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜