簡體   English   中英

iPhone5s上的Storyboard錯誤,適用於iPhone5

[英]Storyboard error on iPhone5s, working on iPhone5

當我嘗試在iphone5s上運行時,我的項目給出了這樣的錯誤。

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

可能有什么問題,哪個屬性可能與iPhone5s不兼容?

我已經通過使用解決了這個問題

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

[storyboard instantiateViewControllerWithIdentifier@"MyViewController"];

以前

[self.storyboard  instantiateViewControllerWithIdentifier@"MyViewController"];

某種程度上使它對情節提要感到困惑,現在它可以工作了。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM