故事板:使用自动布局约束将自定义 UIView 中的按钮与父 UIView 中的另一个按钮对齐?

Storyboard: align button in custom UIView to another button in parent UIView using auto-layout constraints?

假设一个自定义的UIView,CustomView,是用一个Xib文件设计的。 CustomView里面是一个UIButton,CustomButton.

ParentView 是包含 CustomView 的 UIView。

使用 Storyboard,是否可以创建自动布局约束,使 CustomButton 与 ParentView 中的另一个按钮居中对齐?

不可以在情节提要中执行您想要执行的操作。您必须以编程方式进行。