Slide 13
Slide 13 text
animateՃ
class ViewController: UIViewController {
@IBOutlet var testView: UIView!
@IBOutlet var testViewLeadingConstraint: NSLayoutConstraint!
@IBAction func buttonTouchDown(_ sender: Any) {
UIView.animate(withDuration: 3.0, animations: {
self.testViewLeadingConstraint.constant =
self.testView.frame.width
})
}
}