解决方案 »

  1.   

    @try {
            UIStoryboard *mainStoryBoard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];        UIViewController *clockViewController = [mainStoryBoard instantiateViewControllerWithIdentifier:@"clockViewController"];
            
            clockViewController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
            [self presentViewController:clockViewController animated:YES completion:nil];
            
        }
        @catch (NSException *exception) {
            NSLog(@"Stack Trace: %@", [exception name]);
        }
    以上是代码,Main.storyboard 的 identify 一栏中的 name 就是 Main.storyboard 我看网上很多都是写 MainStoryboard 的 但是仍然有异常
      

  2.   

    @"Main"  而不是@“Main.storyboard”  不需要加扩展名 .storyboard
    你自己下面帖出的例子中也有了答案
    UIStoryboard *mainStoryBoard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];