You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This used to be illegal, where `anim` is a CABasicAnimation:
anim.toValue = CGPoint.zero
It was illegal because toValue was an id and CGPoint was not an AnyObject. Now toValue is an Any and everything is boxable, so it's legal. But it's also ineffective; the user is going to be caught flatfooted when the animation doesn't work. Perhaps we could help by doing what the user should have done, i.e. wrap in an NSValue?
The text was updated successfully, but these errors were encountered:
Please note that I'm referring here only to the limited situation where (1) an object is expected and (2) there's a standard NSValue initializer for this kind of value.
Also we'd need to cover both e.g. CGPoint (map it to NSValue wrapping CGPoint) and array of CGPoint (map it to array of NSValues wrapping CGPoints), and so on.
The core team accepted SE-0139, which should make this case work properly by bridging CGPoints to NSValues as expected by CoreAnimation. This has been implemented in #4922 and should be available in future 3.x seeds.
Environment
Xcode Version 8.0 beta 6 (8S201h)
Additional Detail from JIRA
md5: b0ee95fad7e9d3a766f343c3895dac26
Issue Description:
This used to be illegal, where `anim` is a CABasicAnimation:
It was illegal because toValue was an id and CGPoint was not an AnyObject. Now toValue is an Any and everything is boxable, so it's legal. But it's also ineffective; the user is going to be caught flatfooted when the animation doesn't work. Perhaps we could help by doing what the user should have done, i.e. wrap in an NSValue?
The text was updated successfully, but these errors were encountered: