是否可以将Nib(.xib)文件添加到静态库中? [英] Whether Nib(.xib) files can be added to a Static Library?

查看:106
本文介绍了是否可以将Nib(.xib)文件添加到静态库中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个静态库。为了实现两个主要功能,我总共使用了4个xib。我在构建SDK时已将这些文件添加到Headers中。但是当在其他项目中使用SDK作为实现时,我收到如下错误:因未捕获的异常而终止应用程序'NSInternalInconsistencyException',原因:'无法在bundle中加载NIB

I am developing a static library. To implement two main functionalities, I have used totally 4 xibs. I have added those file to the Headers while building the SDK. But while using the SDK in some other project as implementation, I am getting an error like : "Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle"

任何人都可以快速给出答案。我需要更改视图控制器吗?这个时候会很痛苦。

Can anyone give an answer quickly. Do I need to change the view controller? It will be much painful at this time.

谢谢

推荐答案

当您使用静态库(与bundle不同)时,您不能。

As you're using a static library (wich is not the same as bundle), you can't.

静态库是包含类的单个文件,由库创建者链接在一起的代码和变量。它不包含其他文件作为XIB,它本质上是一个编译代码的数据库。

A static library is a single file that contains classes, code and variables that were linked together by the library creator. It does not contain other files as XIB ones, it is essentially a database of compiled code.

这篇关于是否可以将Nib(.xib)文件添加到静态库中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆