diff --git a/examples/TapToBounceTraitsExample.swift b/examples/TapToBounceTraitsExample.swift index 81dbfd9..cf86814 100644 --- a/examples/TapToBounceTraitsExample.swift +++ b/examples/TapToBounceTraitsExample.swift @@ -29,6 +29,10 @@ class TapToBounceTraitsExampleViewController: UIViewController { circle.bounds = CGRect(x: 0, y: 0, width: 128, height: 128) circle.center = view.center circle.layer.cornerRadius = circle.bounds.width / 2 + circle.layer.borderColor = UIColor(red: (CGFloat)(0x88) / 255.0, + green: (CGFloat)(0xEF) / 255.0, + blue: (CGFloat)(0xAA) / 255.0, + alpha: 1).cgColor circle.backgroundColor = UIColor(red: (CGFloat)(0xEF) / 255.0, green: (CGFloat)(0x88) / 255.0, blue: (CGFloat)(0xAA) / 255.0, @@ -51,6 +55,10 @@ class TapToBounceTraitsExampleViewController: UIViewController { let animator = MotionAnimator() animator.animate(with: traits) { sender.transform = CGAffineTransform(scaleX: 1.5, y: 1.5) + + // This would normally not be animatable with the UIView animation APIs, but it is animatable + // with the motion animator. + sender.layer.borderWidth = 10 } } @@ -58,6 +66,7 @@ class TapToBounceTraitsExampleViewController: UIViewController { let animator = MotionAnimator() animator.animate(with: traits) { sender.transform = .identity + sender.layer.borderWidth = 0 } } } diff --git a/examples/TapToBounceUIKitExample.swift b/examples/TapToBounceUIKitExample.swift index bdd30d4..95ff44b 100644 --- a/examples/TapToBounceUIKitExample.swift +++ b/examples/TapToBounceUIKitExample.swift @@ -30,6 +30,10 @@ class TapToBounceUIKitExampleViewController: UIViewController { circle.bounds = CGRect(x: 0, y: 0, width: 128, height: 128) circle.center = view.center circle.layer.cornerRadius = circle.bounds.width / 2 + circle.layer.borderColor = UIColor(red: (CGFloat)(0x88) / 255.0, + green: (CGFloat)(0xEF) / 255.0, + blue: (CGFloat)(0xAA) / 255.0, + alpha: 1).cgColor circle.backgroundColor = UIColor(red: (CGFloat)(0xEF) / 255.0, green: (CGFloat)(0x88) / 255.0, blue: (CGFloat)(0xAA) / 255.0, @@ -50,6 +54,10 @@ class TapToBounceUIKitExampleViewController: UIViewController { options: [], animations: { sender.transform = CGAffineTransform(scaleX: 1.5, y: 1.5) + + // This would normally not be animatable with the UIView animation APIs, but it is animatable + // with the motion animator. + sender.layer.borderWidth = 10 }, completion: nil) } @@ -61,6 +69,7 @@ class TapToBounceUIKitExampleViewController: UIViewController { options: [], animations: { sender.transform = .identity + sender.layer.borderWidth = 0 }, completion: nil) } }