I downloaded an app with nice design and unpacked it's contents. I'd like to look at the NIBs to see how the app is put together. I renamed the NIBs to XIB, but Interface Builder won't open them ("Interface Builder was unable to determine the type of PageView.xib"). Is there any way to force it to open the file. Would I be able to see anything without the original project?
+2
A:
Short answer: No.
You can't just rename nib to xib, they are different formats. A nib is a package containing serialized objects in binary form, a xib is an xml representation of the serialized objects.
Longer answer:
Once upon a time binary nibs contained the information necessary in order for Interface Builder to display them (specifically, designable.nib), but since they are now primarily used for distribution (as opposed to development) that information is stripped by Xcode during application build when a xib is compiled into a nib.
Technically it is possible to instantiated a nib and introspect much of the information out of it, but it is non-trivial and wouldn't result in anything like using Interface builder.
Louis Gerbarg
2010-02-13 13:18:26
Also, most of the really slick looking interfaces rely on custom user interface elements, which you would not see in Interface Builder. My own applications don't even have any Nib files.
Brad Larson
2010-02-13 15:00:24
Thanks for the answer. I'd assumed that since the information in XIBs is just XML, that I could use it for something. @Brad Although the NIBs haven't been useful, I've learned things from the graphics files in apps. There's plenty of information on the web about programming, but creating nice looking views is more difficult to learn about.
nevan
2010-02-17 07:31:47