포 그라운드 응용 프로그램에 들어올 때 UIViewController를 표시하려고합니다.
그리고이 코드는 applicationWillEnterForeground Objective C appDelegate 앱에서 사용하고 있지만 나에게는 적합하지 않습니다. 당신이 무엇을 이해 할수 않습니다응용 프로그램 대리인 iOS10의 applicationWillEnterForeground 메서드에서 모달 UIViewController를 표시하는 방법 ObjectiveC
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