iOS 14 用StoryBoard遇到的坑

  UIStoryboard * sb =
        [UIStoryboard storyboardWithName:@"Main" bundle:nil];
        UIViewController * peInfo =
        [sb instantiateViewControllerWithIdentifier:@"info"];
        
        NSLog(@"%@--%@",self.navigationController,peInfo);
        if (self.navigationController && peInfo) {
            [self.navigationController pushViewController:peInfo animated:YES];
        }else{
            [self presentViewController:peInfo animated:YES completion:nil];
        }
       

上面这段代码 ,在ios14之前都好好的,今天
在ios14.3上被坑了。

你可能感兴趣的:(iOS 14 用StoryBoard遇到的坑)