フォアグラウンドアプリケーションに入るときにUIViewControllerを表示します。
そして私はapplicationWillEnterForegroundメソッドでこのコードを使用していますが、Objective C appDelegateアプリでは動作しません。あなたは何を数えるんアプリケーションのデリゲートiOS10のapplicationWillEnterForegroundメソッドでモーダルUIViewControllerを表示する方法Objective C
UIStoryboard *sb = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
PasscodeViewController *vc = [sb instantiateViewControllerWithIdentifier:@"passcodeVCID"];
[self presentViewController:vc animated:YES completion:nil];
はappDelegate内部self' 'のですか? – NSNoob
私はuiviewcontrollerでSELFを使用していました。作品があります。しかし、私はここでそれを処理する方法を知らない。 –
UIViewControllerクラスでは、selfはViewControllerです。 'presentViewController'はUIViewController.hで定義されているメソッドなので、そこで動作します。 AppDelegateでは、selfはAppDelegateであり、 'presentViewController'というメソッドはありません。 – NSNoob