@@ -74,7 +74,9 @@ class UIKitBehavioralTests: XCTestCase {
7474 . position: CGPoint ( x: 50 , y: 20 ) ,
7575 . rotation: 42 ,
7676 . scale: 2.5 ,
77- . transform: CGAffineTransform ( scaleX: 1.5 , y: 1.5 ) ,
77+ // Note: prior to iOS 14 this used to work as a CGAffineTransform. iOS 14 now only accepts
78+ // CATransform3D instances when using KVO.
79+ . transform: CATransform3DMakeScale ( 1.5 , 1.5 , 1.5 ) ,
7880 . width: 25 ,
7981 . x: 12 ,
8082 . y: 23 ,
@@ -158,12 +160,20 @@ class UIKitBehavioralTests: XCTestCase {
158160 ]
159161
160162 let properties : [ AnimatableKeyPath : Any ]
161- if #available( iOS 11 . 0 , * ) {
163+ if #available( iOS 13 , * ) {
164+ // Shadow opacity became implicitly animatable in iOS 13.
165+ var baselineWithModernSupport = baselineProperties
166+ baselineWithModernSupport. removeValue ( forKey: . shadowOpacity)
167+ baselineWithModernSupport. removeValue ( forKey: . anchorPoint)
168+ baselineWithModernSupport. removeValue ( forKey: . cornerRadius)
169+ properties = baselineWithModernSupport
170+
171+ } else if #available( iOS 11 . 0 , * ) {
162172 // Corner radius became implicitly animatable in iOS 11.
163- var baselineWithOutCornerRadius = baselineProperties
164- baselineWithOutCornerRadius . removeValue ( forKey: . anchorPoint)
165- baselineWithOutCornerRadius . removeValue ( forKey: . cornerRadius)
166- properties = baselineWithOutCornerRadius
173+ var baselineWithModernSupport = baselineProperties
174+ baselineWithModernSupport . removeValue ( forKey: . anchorPoint)
175+ baselineWithModernSupport . removeValue ( forKey: . cornerRadius)
176+ properties = baselineWithModernSupport
167177
168178 } else {
169179 properties = baselineProperties
0 commit comments