I know I can check if a URL has been used to open my application, like so:

- (BOOL)application:(UIApplication*)application
          openURL:(NSURL*)url
sourceApplication:(NSString*)sourceApplication
       annotation:(id)annotation'

... but how do I check if the user has only returned to the app (and update my interface accordingly), without a URL being used? The use case is when logging in to Facebook or Twitter via Safari, and then user just goes back to the app instead.

有帮助吗?

解决方案

Use applicationDidBecomeActive or applicationWillEnterForeground

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top