gpt4 book ai didi

iphone - UIView.我可以使用的最大边界尺寸是多少?

转载 作者:行者123 更新时间:2023-12-03 18:43:17 25 4
gpt4 key购买 nike

有人知道 someView.bounds.size 的最大值吗?我正在创建一个 View 层次结构,其中所有 subview 的累积边界框等于根父 View 。

干杯,道格

最佳答案

根据UIView documentation :

Prior to iPhone OS 3.0, UIView instances may have a maximum height and width of 1024 x 1024. In iPhone OS 3.0 and later, views are no longer restricted to this maximum size but are still limited by the amount of memory they consume. Therefore, it is in your best interests to keep view sizes as small as possible. Regardless of which version of iPhone OS is running, you should consider using a CATiledLayer object if you need to create views larger than 1024 x 1024 in size.

实际上,我能够在 2.x 中的标准 iPhone/iPhone 3G 上创建尺寸为 2048 x 2048 的 UIView 和 CALayers。任何高于此值的内容都会停止渲染。

关于iphone - UIView.我可以使用的最大边界尺寸是多少?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1493895/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com