How to add to Interface builder classes in a static library, permanently? - iphone

I know the thread on Interface Builder can't see classes in a static library
there add to InterfaceBuilder(IB) classes in static library, temporary.
The way is drag & drop the header files(.h).
It's working in one time booting the IB
I wanna permanently add to IB the classes.
How to do this?

In short, I'm not aware of any solution. Typically Read class Files... menu item in IB is sufficient to make IB aware of classes in static libraries.

Related

XCode wont let me use a Static Library View in my xib files

I created a new project of type Static Linked Library.
I have moved the code (previously working in the app) to the library leaving all the xib files in the app.
I have changed the export directory and added the library file from the derived data folder so it gets the compiled version and links to it.
I have added the library to the bundle and have verified it is in the app using iPhone Explorer
I have verified that the xib file recognized the new view type by removing and selecting the custom view type in the custom class field of the identity inspector.
I have changed all of the #import commands to reflect the <> VS "" change and have gotten the app to compile.
however none of the methods of my custom class can be executed. and an NSLog reports that the class is its base counterpart as opposed to the custom derived class.
I am at a loss and have spend a long time converting all the code I have to work in a library. I am hoping someone can help with this.
On this issue, it turns out that Objective C's compiler does not load the categories and custom classes in the libraries by default. There are 2 ways to overcome this.
And here are your options.
Create an Activation type method on the category that will be called to "Activate" that Class or Category. This will need to be done before the application loads any nib files. And seems like a bit of a pain in the butt. This was however how I originally overcame this issue.
Add linker flags that will tell objective C to load all libraries and attach any and all Categories and Classes within the libraries before executing the application. (this will need to be done, on top of #import(ing) the correct files from their correct locations. I will provide a graphic below. and provide the flags for search purposes
-ObjC is the first one I added, but -all_load really did the trick.
I hope that others can benefit from this experience.

Some open source libraries,UI components , Frameworks, Reusable views, controllers, buttons, table cells, etc?

Some of the open source libraries which can be reused.
Three20 is the best open source project which implements the custom UI components. MailCore is a project which implements the framework for doing stuff with IMAP, pop and other mail related protocol.

How to create an Interface Builder plugin in XCode5+?

I need make an Object Library, an Interface Builder plugin like Mapkit so that user can drag my Custom Object and add to UIView.
As property, i want to show and configure it with my basic properties.
Any idea how to do this?
thanks.
In Xcode 4.0, Apple has removed support for using custom Interface Builder palettes provided by IBPlugins in the Interface Builder editor. Xibs/Nibs that use such plugins will still compile but they cannot be edited. You'll need to install Xcode 3 (in a separate folder so as not to overwrite 4) and use it to edit xibs with custom palettes.
This is all in Xcode 4's release notes. Stay tuned to prerelease release notes for more updates on this matter.
Update for Xcode 6
Plugins are no longer necessary. See #IBDesignable and #IBInspectable. :-)
You need to create an Interface Builder plugin for that; the static library has nothing Interface Builder knows how to work with.

Is there a way to add Interface Builder options to a custom class?

In my app, I made a subclass of UIView that I want to use in Interface Builder. Is there a way to make the instance variables settable via the "Attributes" section of IB?
Yes but not easily. In order for any custom controls to have Interface Builder support, you'll need to develop an IB plugin. I recommend going to the source for the nitty gritty. Take a look at the Interface Builder Plugin Programming Guide. Or, for a less overwhelming source, this blog.

Interface Builder

What is the difference between creating an IPhone application using Interface Builder and without it?
Interface builder is simply an application that can help you place GUI elements and then associate IBOutlets and other in-code functions. you can go into Dashcode and actually read the code generated by Interface Builder but I think you will find that it is LONG and repetitive. Interface builder simply makes it easier to get the interface elements where and how you want them using a GUI. you don't NEED it but its sure useful.
you can create a full interface without an .xib or interfacebuilder you just have to write more code.