Seeing that this is the only mention of this problem (function?) That I discovered somewhere in the past year and a half, let me first thank you for being my only source of sanity. With this, I was finally able to go back and demystify it ... sort of. I have yet to radar just because it is unclear whether this behavior is intended. Whatever the correct behavior, the animation has some weird side effects, which led me to a separate issue .
This problem
, image
, . , UIKit
. , :
CATransaction.begin()
CATransaction.setDisableActions(true)
annotationView.image = newImage
CATransaction.commit()
, , , . , , , (, centerOffset
centerOffset
), centerOffset
, not
, , UIKit- . , UIKit CoreAnimation:
CATransaction.begin()
CATransaction.setAnimationDuration(animationDuration)
CATransaction.setAnimationTimingFunction(CAMediaTimingFunction(name: .easeIn))
UIView.animate(withDuration: animationDuration, delay: 0, options: .curveEaseIn, animations: {
self.image = newImage
self.centerOffset = newCenterOffset
}, completion: nil)
CATransaction.commit()
UIKit, CoreAnimation.