相关疑难解决方法(0)

无法使用内部使用.xib文件的iOS框架

我正在尝试通过遵循此URL中指定的步骤为iOS创建通用框架:Universal-framework-iOS

我有一个viewController类,该框架内部加载.xib文件.

下面是代码的一部分,它显示了我如何初始化viewController并显示相关视图:

/*** Part of implementation of SomeViewController class, which is outside the framework ***/

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.

    self.viewControllerWithinFramework = [[ViewControllerWithinFramework alloc] initWithTitle:@"My custom view"];
}
- (IBAction)showSomeView:(id)sender {
    [self.viewControllerWithinFramework showRelatedView];
} 

/*** Part of implementation of ViewControllerWithinFramework class, which is inside the framework ***/

- (id)initWithTitle:(NSString *)aTitle
{
   self = [super initWithNibName:@"ViewControllerWithinFramework" bundle:nil]; // ViewControllerWithinFramework.xib is within the framework

   if (self)
   { …
Run Code Online (Sandbox Code Playgroud)

cocoa-touch objective-c xib ios ios7

11
推荐指数
1
解决办法
8461
查看次数

标签 统计

cocoa-touch ×1

ios ×1

ios7 ×1

objective-c ×1

xib ×1