iOS iPhone 应用程序允许的最大 nib 文件数量

发布于 2024-12-13 02:13:44 字数 91 浏览 1 评论 0原文

应用程序中可以使用的 nib 文件数量是否有限制。 在我的应用程序中,我使用 50 个 nib 文件,因为我必须在运行时加载此 nib 文件,所以会出现任何内存问题吗?

Is there is any limitation on the number of nib files can be used in a application.
In my application I am using 50 nib files will there be any memory issue as i have to load this nib files on run time.

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

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

发布评论

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

评论(3

莫多说 2024-12-20 02:13:44

我不知道是否有限制,但即使你有数百个 NIB,它们也不会同时加载到内存中。 iPhone 应用程序的视图是延迟加载的。这更多的是一个关于应用程序可以有多大的问题。这些文件只是描述你的布局的XML(再次编译为二进制文件)描述你的布局,所以我认为这个数字必须是你要求的很多倍才可能成为问题,甚至那么这是一个关于应用程序可以有多大的问题,而不是 RAM 的问题。

已更新

应用程序大小提示(仅适用于 iOS 应用程序)
应用程序可以大至 2GB,但是
请注意下载时间。
努力最小化文件大小。
请记住,无线下载有 20MB 的限制

https://itunesconnect.apple.com/docs/ iTunesConnect_DeveloperGuide.pdf

I don't know if there is a limit, but even though you have hundreds of NIB's they won't be loaded into the memory at the same time. The view's of a iPhone application is lazely loaded. This is more a question on how a large an application can be. Those files are only XML (which again is compiled to binary as commented) files describing your layout so I would suppose that the number must be many times what you asked of before it can be an issue, and even then this is a question on how large an application can be and not RAM.

Updated

App Size Tips (For iOS Apps Only)
Apps can be as large as 2GB, but
be aware of download times.
Make efforts to minimize file size.
Remember there is a 20MB limit for Over the Air downloads

https://itunesconnect.apple.com/docs/iTunesConnect_DeveloperGuide.pdf

会傲 2024-12-20 02:13:44

.xib 文件(在 Xcode 中)和应用程序中的 .nib 文件之间存在差异。 .xib 文件是 xml,.nib 文件是二进制存档。

大小也截然不同,在应用程序中,我的 .xib 文件为 45,124 字节,但应用程序中的 .nib 文件为 4,823 字节。

另外,更多的 nib 文件也可以是好的设计,每个 nib 都包含一个 UI 概念。

There is a difference between .xib files (in Xcode) and .nib files in the app. .xib files are xml and .nib files are binary archives.

The sizes are also drastically different, in an app I have a .xib file was 45,124 bytes but the .nib file in the app was 4,823 bytes.

ALso more nib files can be good design, each nib containing one UI concept.

静若繁花 2024-12-20 02:13:44

我对此不确定,但我认为从 nib 文件加载对象实例会产生一点 RAM 开销。然而,当加载对象时,它们可能消耗与“常规”实例相同数量的 RAM。

所以我认为这取决于这些 nib 文件的复杂性。

话又说回来,我不确定,所以不要相信我的话;)。

I'm not sure about this, but I think loading object instances from nib files has a little RAM overhead. When the objects are loaded however, they probably consume the same amount of RAM as 'regular' instances.

So I think it comes down to the complexity of these nib files.

Then again, I'm not sure so don't take my word for it ;).

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