正如我在评论中提到的,你总是可以使用StackView:)
以下是如何做到这一点:)
首先向视图控制器添加六个文本字段:)
尚未向任何文本字段添加约束:)
现在选择所有textfields和stackView给他们:)
添加堆栈后,它看起来像:)
现在选择textField中的任何一个并添加宽度约束:)
然后选择所有文本文件并选择Equal Width约束:)
如果要在所有文本字段之间添加相等的间距:)删除文本字段上的宽度约束:)选择stackView
最后你必须将约束添加到stackView本身:)多数民众赞成:)
最终输出看起来像这样:)
希望我的冗长答案能帮到你:D