适用于iPhone 5的iPhone 5s上的故事板错误

时间:2014-09-02 11:43:27

标签: ios iphone uistoryboard

当我尝试在iphone 5s上运行时,我的项目会出现这样的错误。

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

哪些属性可能与iPhone 5s不兼容?

1 个答案:

答案 0 :(得分:0)

我已经使用

解决了这个问题
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" withBundle:[NSBundle mainBundle]];

[storyboard instantiateViewControllerWithIdentifier@"MyViewController"];

之前是

[self.storyboard  instantiateViewControllerWithIdentifier@"MyViewController"];

不知何故,它对故事板感到困惑,现在它起作用了。