views:

40

answers:

1

I know it is easy to create a NIB file easily with interface builder but I was wondering if there is a way to archive an existing UIView into a NIB for use later.

It looks like a NIB file is just a special type of bundle where each of the UIView objects are archived using NSCoding but I cannot seem to find any more info beyond that. All the resources I've found talk about using interface builder to create the proper NIB file.

Any help would be appreciated!

+1  A: 

I'm afraid you can't. You can archive an UIView to whatever file, but you can't use it as a nib file.

You can dump the content of a nib file to an Objective-C code using nib2objc, but I guess it's not what you want.

Yuji
Interesting project nonetheless!
djdrzzy