Try dragging the static library into your xib browser in Interface Builder. I haven't tried this with a static library, but the concept is the same. When you drag header files into IB, you can access those classes.
Can someone please clarify what the "XIB browser/explorer" is? Also, where were the header files dragged in from, exactly? (The static lib project itself, or somewhere else?)
I have the same problem as you, teabot. I created a static library which includes UIViews. But when I create a UIView with Interface Builder and I want to associate it with one of my views defined in my static library, I couldn't: my Inspector doesn't know my own classes.
Currently, I can only use my static library with XCode.
Is it possible to use static library with IB? If yes, how?
Thanks for your help.
LexH, try linking with the -ObjC flag when building your static library. That worked for me... for about a year :-) I found this post as the problem has returned with a fresh OSX install and an upgrade in xcode. But it worked in XCode 3.1.2.
- David
Add the same problem as LexH. It worked only when I called a dummy class method. The problem was that I did not add my static library to the "link binary with libraries" under target. Strangely everything else worked.
I followed this guide to link with my static lib Create static lib
I had the same problem. Dragging the library or headers to XIB Browser didn't work. Read Class Files didn't work. So I called:
[MyLibraryClass version]; // Substitute your class name for "MyLibraryClass".
This worked. version is a class method of NSObject, so all subclasses of NSObject inherit it.