So I'm making an app, and its going to have a couple of uilabels, stacked on top of each other, all collapsed to a certain size. I have a button that expands each uilabel, individually, but I want to make it so that when one expands, the positions of the others move. Is there a way to do it other than changing the y position of each label, every time?
my code atm is
@IBAction func expandbutton(sender: AnyObject) {
uilabel1.frame = CGRectMake(uilabel1.frame.origin.x, uilabel1.frame.origin.y, uilabel1.frame.width, uilabel1.frame.height + 120)
uilabel2.center = CGPointMake(deltaX, deltaY)
uilabel3.center = CGPointMake(deltaX, deltaY)
....
}