Trouble using xib files in libraries
Posted
by flohei
on Stack Overflow
See other posts from Stack Overflow
or by flohei
Published on 2010-05-09T09:39:50Z
Indexed on
2010/05/09
9:48 UTC
Read the original article
Hit count: 185
Hi there,
I'm having some trouble working with libraries and included xib files. Let me explain my situation first. I've got a project that's running pretty good. Now I need a part of my project as a library for another customer who want's to use some of the functionality in his app. I've created a library with help of that highly recommended article.
My customer should be able to initialize a main view controller like this:
LibraryMainViewController *lmvc = [[LibraryMainViewController alloc] initWithNibName:@"LibraryMainViewController.xib" bundle:foo];
That for sure leads to an error when I try to present that view controller modally. I'm not sure what bundle I have to use here. I tried something like
[NSBundle bundleForClass:[SomeClassInTheLibrary class]];
but that didn't solve the problem.
I would be glad if someone could tell me how to actually use a xib file in that kind of situation.
Thanks
–f
© Stack Overflow or respective owner