简体   繁体   中英

How can I view an XIB from an app store app?

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM