Swift animation with constraint -
is possible make uiview animation changing constraints?
basically, want animate myv
(uiview) has x, y, height , width constraints, using: uiview.animatewithduration(1.5) {}
changing old constraints.
yes possible. can this:
func animateheight() { uiview.animatewithduration(1.5, animations: { self.heightcons.constant = 250 // value self.view.layoutifneeded() }) }
where self.heightcons
iboutlet
height constraint on uiview
.
if don't use storyboards can check out how create layout constraints programmatically.
for info on core animation , auto layout: combining autolayout core animation
Comments
Post a Comment