在XCode中使用依赖项目的故事板



我有一个XCode项目和一个配置为依赖项目的iOS框架。我已经在我的依赖项目中创建了一个故事板。然而,当我尝试从主项目加载这个故事板时,我得到:

Could not find a storyboard named 'MyLibStoryboard' in bundle NSBundle. 

我已经使用这个教程配置了我的iOS框架:https://github.com/jverkoey/iOS-Framework。

这是一个用来加载storyboard的代码:
https://gist.github.com/poiuytrez/5831043

  1. 通过查看XCode生成的应用程序来调试应用程序。检查storyboard或bundle是否存在。(谢谢michael)
  2. MyLib生成的bundle不存在
  3. 使用目标MyLibResources构建bundle
  4. 在主项目的XCode中拖放bundle。

最新更新