Using custom UI views from library in interface builder
I have 2 projects. One is a library that I am compiling to a .a file and the other is the application. The library has a class (AdFactoryView) that extends UIView that is used to display ads. Previously I was creating the AdFactoryView programmatically calling initWithFrame, now I'm trying to put the class directly into a nib and use it from there. I can find the class in the interface builder library, add it and link up the reference to an IBOutlet but when the code runs I get a message that says:
Unknown class AdFactoryView in Interface Builder file.
And the IBOutlet contains a UIView instead of an AdFactoryView. How do I g开发者_JAVA百科et the view from my library to work correctly?
Extra information: The application is built by importing the .a and .h files for the library. I have another project that references the entire library project directly that I use for testing, in this project AdFactoryView does not show up in interface builder.
Edit: This suddenly started working in my application project, though I still can't see the custom views in interface builder in my test project.
精彩评论