开发者

UIApplicationDelegate becomeactive with options

I implemented association with files in my app that works pretty great but I still have ine problem that i cannot fugire out.

im my

  • (BOOL)application:(UIApplication *)开发者_高级运维application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

I have this code. it doesn't work when the app become active from background.

NSURL *url = (NSURL *)[launchOptions valueForKey:UIApplicationLaunchOptionsURLKey];

any suggestion how can i make this work ?

Thanks.


This method:

(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

is only called when you app just launched. Coming back from background is not launching your app.

You may find these two methods useful.

- (void)applicationWillEnterForeground:(UIApplication *)application {
- (void)applicationDidBecomeActive:(UIApplication *)application {


You need to also hook with applicationDidBecomeActive: when the app became active from multitasking.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜