代码之家  ›  专栏  ›  技术社区  ›  erdemgc

iPhone5s上的故事板错误,在iPhone5上工作

  •  0
  • erdemgc  · 技术社区  · 12 年前

    当我尝试在iphone5s上运行时,我的项目出现了这样的错误。

    terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 
    'Storyboard  (<UIStoryboard: 0x7ffe90414500>) doesn't contain a view controller with 
    identifier 'galleryPageViewController''
    

    哪种属性可能与iPhone5s不兼容?

    1 回复  |  直到 12 年前
        1
  •  0
  •   erdemgc    12 年前

    我用

    UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" withBundle:[NSBundle mainBundle]];
    
    [storyboard instantiateViewControllerWithIdentifier@"MyViewController"];
    

    那是以前的事

    [self.storyboard  instantiateViewControllerWithIdentifier@"MyViewController"];
    

    不知怎么的,它混淆了故事板,现在它起作用了。