混合方法以编程方式创建自动布局约束

Mix approach to create Autolayout constraints programmatically

我正在尝试以编程方式创建 Autolayouts,因此我参考了 [Autolayout 指南][1]。我在其中找到了三种以编程方式创建 Autolayouts

的技术
  1. 布局锚点
  2. NSLayoutConstraint Class
  3. 视觉格式语言

关于视觉格式语言 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 LanguageLayout Anchors 来创建其他 constraintsVisual Format Language 以及 Aspect ratio constraintsLayout Anchors 吗?

当然 - 一旦创建了布局约束(通过任何方式),它就是一个正常的布局约束。