Launching ViewController from AppDelegate

后端 未结 6 2047
情书的邮戳
情书的邮戳 2021-02-03 09:51

I have a custom URL scheme and i want to open a certain ViewController which is not the root when i go to this URL. I have been able to do that and what remains is

6条回答
  •  鱼传尺愫
    2021-02-03 10:42

    Write this code in didFinishingWithLaunchingOptions

      SecViewController *Vc = [[UIStoryboard storyboardWithName:@"Main" bundle:nil]instantiateViewControllerWithIdentifier:@"second"];
       [(UINavigationController *)self.window.rootViewController pushViewController:Vc animated:YES];
    

提交回复
热议问题