I am in need of loading a XIB file from a bundle. I am integrating with an external static library that shares with me a .bundle. Now, this .bundle has a XIB folder which contains MyView.xib file.
I am trying with below code:
NSBundle *frameworkBundle = [NSBundle bundleForClass:[self class]];
NSURL *fileURL = [frameworkBundle URLForResource: @"External" withExtension:@"bundle"];
NSBundle *bundle = [NSBundle bundleWithURL:fileURL];
self = [self initWithNibName:@"MyView" bundle:bundle];
This code leads to crash.
During debug, I found that I get correct frameworkBundle
handle and its loaded as well but while bundle
handle is correct, I see a message "Not Loaded Yet" next to it.
Anyone have any idea as to how to tackle this?