混合方法以编程方式创建自动布局约束
Mix approach to create Autolayout constraints programmatically
我正在尝试以编程方式创建 Autolayouts
,因此我参考了 [Autolayout 指南][1]。我在其中找到了三种以编程方式创建 Autolayouts
的技术
- 布局锚点
- NSLayoutConstraint Class
- 视觉格式语言
关于视觉格式语言 Autolayout Guide
说:
The notation emphasizes good visualization over completeness.
Therefore some constraints (for example, aspect ratios) cannot be
created using the visual format language.
我可以混合使用 Visual Format Language
和 Layout Anchors
来创建其他 constraints
和 Visual Format Language
以及 Aspect ratio constraints
和 Layout Anchors
吗?
当然 - 一旦创建了布局约束(通过任何方式),它就是一个正常的布局约束。
我正在尝试以编程方式创建 Autolayouts
,因此我参考了 [Autolayout 指南][1]。我在其中找到了三种以编程方式创建 Autolayouts
- 布局锚点
- NSLayoutConstraint Class
- 视觉格式语言
关于视觉格式语言 Autolayout Guide
说:
The notation emphasizes good visualization over completeness. Therefore some constraints (for example, aspect ratios) cannot be created using the visual format language.
我可以混合使用 Visual Format Language
和 Layout Anchors
来创建其他 constraints
和 Visual Format Language
以及 Aspect ratio constraints
和 Layout Anchors
吗?
当然 - 一旦创建了布局约束(通过任何方式),它就是一个正常的布局约束。