Animation.basic(duration:curve) Deprecated

I installed Xcode beta 4, opened the project I'm working on and found that all the static Animation types, including basic(duration:curve) have been deprecated.


What replaces them?


-Patrick

Replies

I have not tried beta 4 yet, but according to the doc, there still exists the Animation type and has many type methods.


Animation.basic(duration: d, curve: .easeInOut)

Animation.easeInOut(duration: d)

The .animation(.basic(duration: 0.3, curve: .easeInOut)) have now been deprecated.

Looking through the docs the above method has nopw been changed to:


.animation(.easeInOut(duration: 0.3))


It does exactly the same thing, I tested this on a prototype I'm coding up and all my calls to .basic got warnings.

I then looked at the docs and realised the method I used was Depricated. The above works perfectly...


Hope it helps.


Steve MacEwan

Someone from the Swift Forums pointed me to the Catalina release notes. I find it strange that it shows up there and not in the Xcode release notes. The developer documentation packaged with Xcode beta 4 only deprecates APIs, it does not specify any new APIs. However, the online developer documentation shows the deprecated APIs and the new APIs.