如何从应用商店应用中查看XIB? [英] How can I view an XIB from an app store app?

查看:82
本文介绍了如何从应用商店应用中查看XIB?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我下载了一个设计精美的应用并解压缩了它的内容。我想看看NIB,看看应用程序是如何组合在一起的。我将NIB重命名为XIB,但Interface Builder不会打开它们(Interface Builder无法确定PageView.xib的类型)。有没有办法强制它打开文件。如果没有原始项目,我能看到任何东西吗?

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?

推荐答案

简答:否。

您不能只将nib重命名为xib,它们是不同的格式。 nib是包含二进制形式的序列化对象的包,xib是序列化对象的xml表示。

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.

更长的答案:

曾几何时,二进制笔尖包含了Interface Builder显示所需的信息它们(具体来说,是designable.nib),但由于它们现在主要用于分发(而不是开发),因此当xib被编译为nib时,Xcode会在应用程序构建期间剥离信息。

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.

从技术上讲,可以实例化一个nib并从中反省大部分信息,但这并非易事,也不会产生类似于使用Interface builder的任何内容。

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.

这篇关于如何从应用商店应用中查看XIB?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆