[Solved] Make one view center as buttom of second view in Auto Layout – iOS [closed]


Just constrain the centerY anchor of the greenView to the bottom anchor of the image view:

greenView.centerYAnchor.constraint(equalTo: imageView.bottomAnchor).isActive = true
greenView.centerXAnchor.constraint(equalTo: imageView.centerXAnchor).isActive = true

1

solved Make one view center as buttom of second view in Auto Layout – iOS [closed]