I'm having problems working with libraries and the xib files are included. Let me explain my situation first. I have a project that works very well. Now I need part of my project as a library for another client who wants to use some functions in their application. I created a library using which recommended an article .
My client should be able to initialize the main view controller as follows:
LibraryMainViewController *lmvc = [[LibraryMainViewController alloc] initWithNibName:@"LibraryMainViewController.xib" bundle:foo];
This definitely leads to an error when I try to present this view controller modulo. I am not sure which package I should use here. I tried something like
[NSBundle bundleForClass:[SomeClassInTheLibrary class]];
but this did not solve the problem.
I would be happy if someone could tell me how to actually use the xib file in such a situation.
thanks
-f
Update
Well, I see that I was somehow mistaken. Just to clarify: I need a library, headers and additional resources, right? Is there any best practice for creating and delivering a βfunctionβ with all of its parts mentioned above?
objective-c uiviewcontroller bundle
flohei
source share