Nib 文件无法从主包中按名称加载
似乎我的笔尖文件包含在我的测试目标中,但它们不存在于主包中,因此当我从主包中按其名称加载笔尖时,我的应用程序崩溃了。我要么需要找到包含我的 nib 文件的正确包,要么需要使用路径加载 nib。
有人有解决方案吗? [NSBundle bundleForClass:[self class]]
不起作用。我认为 nib 和类文件不在同一个包中
It seems as though my nib files are included in my test target, they don't exist in the main bundle, so my app crashes on me when I am loding a nib by its name from the main bundle. I either need to find the correct bundle that includes my nib file, or I need to load a nib using a path.
Does anyone have a solution for either one? [NSBundle bundleForClass:[self class]]
doesn't work. I think the nib and class files are not in the same bundle
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
枚举捆绑包可能会有所帮助
It might help to enumerate the bundles