Abhinav
Abhinav

Reputation: 38152

Application comes to foreground from background

When application comes to foreground from background then appixationDidBecomeActive gets called. Now, I want to refresh the page from which the home button was tapped. In which method I can write the refresh code. viewWillAppear is not getting called.

Upvotes: 1

Views: 1607

Answers (2)

Maulik Pandya
Maulik Pandya

Reputation: 2220

You can use custom notification like : NSNotificationCenter. And on call of this you can refresh your view.

Upvotes: 0

iOS Monster
iOS Monster

Reputation: 2119

In this case viewWillAppear never gets called, you can fire notification(s) whenever -(void)applicationWillEnterForeground:(UIApplication *)application gets called and use it on the view you want.

Upvotes: 5

Related Questions