-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename public types that conflict with SwiftUI types #1761
Conversation
08e0b8b
to
d7805c9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Just a few questions
@IBDesignable | ||
final public class AnimationView: AnimationViewBase { | ||
final public class LottieAnimationView: LottieAnimationViewBase { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you put any thought into what we'd name a SwiftUI View
for Lottie animations? If both LottieAnimation
and LottieAnimationView
are taken I wonder what options we would have
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question, LottieView
is a potential option. How have we been handling this in other cases, where we provide a UIView and SwiftUI View with the same functionality?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I think LottieView
would work!
This PR renames
Animation
andColor
toLottieAnimation
andLottieColor
, to resolve conflicts with theSwiftUI
Animation
andColor
types. For consistency this PR also renamesAnimationView
toLottieAnimationView
.Fixes #1420.
We'll release Lottie 3.5 next week, with this being the only change from 3.4.4. This version includes typealiases for the old names, so there is no source breakage. Xcode emits a warning with a fix-it to update callsites to the new name.
In a few weeks we plan on releasing Lottie 4.0. We will remove the old typealiases, which will resolve the naming conflict with SwiftUI.