Skip to content
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

Use of undeclared type 'LOTAnimationView' #847

Closed
djukidjuki opened this issue Apr 2, 2019 · 4 comments
Closed

Use of undeclared type 'LOTAnimationView' #847

djukidjuki opened this issue Apr 2, 2019 · 4 comments

Comments

@djukidjuki
Copy link

Hello folks, I'm having trouble with Lottie since my Xcode updated to v10.2 last week, everything was working as expected before that.

I'm using Lottie v3.0.3, iOS platform (Swift).

After installing Lottie by using CocoaPods, I'm able to import it into class, but when I connect LOTAnimationView view from a Storyboard to IBOutlet I'm getting Use of undeclared type 'LOTAnimationView'.

I tried to uninstall lottie-ios pod, delete derived data, clean the project, but once I install it again, I'm unable to build the project and the same error appears.

I would really appreciate if you have any advice or prior experience with this.

@joekim
Copy link

joekim commented Apr 3, 2019

@djukidjuki - LOTAnimationView is now AnimationView among other name changes.

@djukidjuki
Copy link
Author

Thank you @joekim ! I'm closing this issue.

@gezamiklo
Copy link

Please tell me: why is it so good to give less specific name for classes. There's a bigger chance to conflict with other frameworks, classes. Not only your framework is an example for this, there are many of them. I like to know, what I am calling, and like to avoid conflicts as much is it possible.

@buba447
Copy link
Collaborator

buba447 commented Oct 10, 2019

@gezamiklo
Lottie 3 is written in swift and intended to be used in swift environments. Swift does away with name spacing because it removes the conflict caused when two different frameworks have the same name. Instead classes are accessible using dot syntax. EG FrameworkA.AnimationView and Lottie.AnimationView.

Because of this the style guidelines for swift say to drop namespaces. https://github.com/raywenderlich/swift-style-guide#class-prefixes

Hope this helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants