0

我正在使用下面的代码在 iPad 上展示一个视图控制器,它可以工作:

- (IBAction)restoreTapped:(id)sender{

    RestoreInfoViewController* restoreInfoViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"RestoreInfoViewController"];
    restoreInfoViewController.delegate = self;
    [self presentViewController:restoreInfoViewController animated:NO completion:nil];
}

在 iPhone 上,出现黑屏。我收到以下警告:

Presenting view controllers on detached view controllers is discouraged 

我哪里错了?

4

0 回答 0