Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

swift how to animate constraint change


You need to first change the constraint and then animate the update.

self.nameInputConstraint.constant = 8

UIView.animate(withDuration: 0.5) {
    self.view.layoutIfNeeded()
}
 
PREVIOUS NEXT
Tagged: #swift #animate #constraint #change
ADD COMMENT
Topic
Name
1+5 =