我想通过静态库中的一些代码从 CFBundle 加载 XIB。
例子:
MyViewController * foo = [[Static Library] instance] getMyViewController];
所以我在手动创建的 CFBundle 中有一个 MyViewController .xib,在它的 Resources 目录中。
但是,如果我尝试通过 getMyViewController 中的 [[MyViewController alloc] initWithNibName:@"MyViewController" bundle:MyBundlePointer] 加载它,我会得到 NSInternalInconsistencyException。
任何想法?我或多或少难倒这个。不确定是否有可能做到这一点。