Are there Constraint Layout Managers on iPhone OS?

删除回忆录丶 提交于 2019-12-05 04:46:14

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.

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.

The only method you can use for positioning views/layers relative to their superview/superlayer is via the springs & struts model. Custom layout managers aren't available on the iPhone.

The Springs and Struts layout support is available via UIView's autoresizingMask property.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!