问题描述
CA编程指南讨论约束布局管理器。但是,iPhone SDK中的CALayer没有任何约束属性或addConstraint方法。
The CA Programming Guide is talking about Constraints Layout Managers. However, the CALayer in the iPhone SDK doesn't have any constraints property or addConstraint method.
他们说iPhone操作系统不提供自定义布局管理器。但是标准的布局如何呢?
They say iPhone OS just doesnt provide custom layout managers. But how about the standard ones?
推荐答案
不幸的是,尽管文档说了这么多,是缺少从CALayer的iPhone实现。这可以通过iPhone上CALayer上缺少的autoresizingMask属性来看到。
Unfortunately, despite the documentation saying so, even the springs-and-struts layout of layers is missing from the iPhone implementation of CALayer. This can be seen by the missing autoresizingMask property on CALayer on the iPhone.
对于,我们通过CALayer的-layoutSublayers方法实现了自己的自定义图层布局。 类提供了一个示例的这种方法。
For Core Plot, we implemented our own custom layer layout via the -layoutSublayers method of CALayer. The CPLayer class provides an example of this approach.
这篇关于在iPhone操作系统上有约束布局管理器吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!