I want to animate an object, so I declare a constraint and add it to the view. I then update the constant
property of the constraint inside an UIView
animation. Why doesn't this code move the object?
UIView.animateWithDuration(1, animations: {
myConstraint.constant = 0
self.view.updateConstraints(myConstraint)
})
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…