“压平编译的 xib 文件”是什么意思?项目构建选项“do”

发布于 2024-11-03 10:15:10 字数 431 浏览 10 评论 0原文

“将 XIB 文件编译为扁平化文件 (非包装)NIB 文件。后 扁平化,产生的NIB更 紧凑但不再可编辑 界面生成器。当这个选项 被禁用,生成的 NIB 文件 在界面中保持可编辑 建设者。”

这是该选项的描述,似乎是我能找到的唯一官方参考。事实上,我也找不到太多非官方的信息——我唯一一次看到人们谈论这个设置是在关于本地化的难度,

解释一下,我会减轻一些负担。

我不知道“扁平化(非包装)”是什么意思。如果有人能 这对我的代码有确切的影响,这里的短期目标是试图弄清楚这是否“弥补”了容器视图,其唯一目的是在界面生成器中移动分组数据,然后执行这些视图。扁平化”应用到它上,仍然会导致设备加载时的运行时延迟。一个下午的仪器就在我面前,但我过去做这样的测试时得到了一些好坏参半的结果,

感谢您的任何见解。

"Compiles a XIB file into flattened
(non-wrapper) NIB file. After
flattening, the resulting NIB is more
compact but no longer editable by
Interface Builder. When this option
is disabled, the resulting NIB file
remains editable in Interface
Builder."

This is the description of the option, and seems to be the only official reference that I can find. And in fact, I can't find much unofficial either -- the only times I see people talking about this setting is in regards to the difficulty of localization.

I don't know what "flattened (non-wrapper)" means. If anyone can shed some light on this, it'd take a load off my mind.

While I'd like to know the exact effect this has on my code, the short-term goal here is trying to figure out if this 'makes up' for container views. Views whose sole purpose is shifting grouped data around in interface builder. Do those views, after having this 'flattening' applied to it, still cause delays at run time on the device in loading. An afternoon with instruments is ahead of me, but I've had some mixed results doing tests like this in the past.

Thanks for any insight.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

哑剧 2024-11-10 10:15:10

在构建过程中,界面构建器文件默认被压缩/扁平化。这样做的优点主要是减少了最终尺寸,也许加载速度也稍快一些。

在 iOS 3.2 之前,XIB 文件始终是扁平化的。直到 3.2 之后,这才作为一个选项公开,可能是为了适应某些开发人员的工作流程。

来自 iOS 3.2 发行说明:

支持外部本地化工具
和工作流程
,Interface Builder 3.2.2
支持保存 iPhone 的选项
可编辑 nib 格式的文档。
此外,Xcode 构建设置
“展平编译的 XIB 文件”和
“剥离 NIB 文件”现在适用于 iPhone
Interface Builder 文档位于
与适用于 Mac OS X 的方式相同
文件。默认情况下,nib 文件将
建造时被剥离。

iOS 3.2支持加载未剥离的nib文件,
但 3.2 之前的 iOS 版本则不然

如果您选择构建未剥离的笔尖
支持本地化的文件
工作流程,您应该使用
ibtool 的 --strip 命令用于剥离 nib
本地化后或临时的文件
恢复“展平编译的 XIB
文件”和“剥离 NIB 文件”构建
构建兼容 nib 文件的设置
与之前的 iOS 版本一起使用。

Interface builder files are compacted/flattened by default during the build process. The advantage of this is mainly a reduced final size, perhaps slightly faster loading as well.

Before iOS 3.2, XIB files were always flattened. Only after 3.2 was this exposed as an option, probably to fit the workflow of some developers.

From the iOS 3.2 release notes:

To support external localization tools
and workflows
, Interface Builder 3.2.2
supports an option to save iPhone
documents in an editable nib format.
Additionally, the Xcode build settings
"Flatten Compiled XIB Files" and
"Strip NIB Files" now apply to iPhone
Interface Builder documents in the
same way they apply to Mac OS X
documents. By default, nib files will
be stripped when built.

iOS 3.2 supports loading unstripped nib files,
but iOS releases prior to 3.2 do not
.
If you choose to build unstripped nib
files to support a localization
workflow, you should either use
ibtool's --strip command to strip nib
files after localizing, or temporarily
revert the "Flatten Compiled XIB
Files" and "Strip NIB Files" build
settings to build nib files compatible
with previous iOS releases.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文