4

Have an application which links to the settings app through:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];

In iOS 9, there is now a way for the user to return to the app again by one back link on the top left of the screen.

Does anybody know how my app can detect that the user came back again? I need to reload the tableview and the viewWillAppear function does not get executed unfortunately...

Machavity
  • 30,841
  • 27
  • 92
  • 100
Markus
  • 3,948
  • 8
  • 48
  • 64

2 Answers2

2

I found it out, just listen to the following notification:

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(enteredForeground) name:UIApplicationWillEnterForegroundNotification object:nil];

;-)

Markus
  • 3,948
  • 8
  • 48
  • 64
-1

You can also add in the method

-(BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options

To know if they pressed the backlink into your app

mKane
  • 932
  • 13
  • 30