create a loop to space 2 different objects on a uiviewcontroller
问题 My code below does exactly what I am looking for the problem is it just does this in a uibtton. I would like to do the same thing with 2 uitextfields and 2 uilabels. So textfield to uilabel to textfield to uilabel. I assume you would just have to change "button in" but I dont know what to change it with. I want the objects spaced 40 between each other just like below. func setConstraints() { var yPosition: CGFloat = 0 [undoButton, clearButton, color].forEach { button in NSLayoutConstraint