-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Using LOTAnimationView in Interface Builder #512
Comments
This is great! Please do! |
Any solution ! |
Hi guys, any update with this? Still found nil while using IB. |
Hey @luayzaemanuel and @fadylateef, I'm not sure what the issues you're experiencing are. I just tried again and can confirm that if you follow the steps for use that I indicated above, as of the latest version (2.5.0) this still works. Best of luck! |
I double checked the interface builder to see if there is LOTAnimationView, there is none. The version of the lottie is 2.5.1 in my app. There are LOTAnimatedControl and LOTAnimatedSwitch although. |
@prmacias, I'm not sure why |
I'm currently getting:
When trying to use a LOTAnimationView in an interface builder file. |
@Xeaza thanks for replying to my post. I tried your solution but it is not working so I'm sticking to LOTAnimatedControl for now. |
Hey @james-rantmedia & @prmacias, I'd need more info to know exactly why you're experiencing the issues you're describing. |
I see the lottie updated its code from LOTAnimationView to AnimationView and I refactored the app and it's coming fine. Thanks! |
@Xeaza I checked your example project and the only difference is that you use Cocoa Pods and I'm using Carthage. Besides that, everything to do with how the Is there anything you're aware of with Carthage that would prevent views from a dynamic framework being used in IB? |
@james-rantmedia Can you update the lottie via Carthage to see if that works? There are some editing from LOTAnimationView to AnimationView. |
I updated to Lottie 3.0.1 and some of my existing animations no longer work, so I have reverted back to 2.5.2. I don't have the time to debug and fix/recreate the animations so that they work in Lottie 3.x right now. |
Understood. Have you tried LOTAnimationControl? Or any other lottie classes (Do you see it in the droplist?) It was working for me and LOTAnimationView is subclassed in LOTAnimationControl. I didn't see any issues with using LOTAnimationControl. |
I didn't try the Interface Builder stuff. Lottie 3.x does not play some of my animations even when I use the animation views without Interface Builder, so I reverted. Even if Lottie does work with IB in this version, it's useless if the animations do not play. I will raise a separate issue regarding that problem. |
@james-rantmedia I wrote the swift rewrite of lottie and Id love to get your animations working. Please file an issue and give me some details to work with. |
Don't forget to add that your setup has Carthage in this issue. Mine's pods. That might narrow the solutions. |
Below is my code, import UIKit class TestAnimationViewController: UIViewController {
} Please help me here. |
@StefanLdhl I understand that you have to specify the module because Lottie comes from Pods/Carthage, in my case I still get an |
I don't think the module name has changed. It looks like you're still using "LOTAnimationView" instead of "AnimationView". See Lottie 3.0 Release Notes |
@StefanLdhl Sorry I was mistaken, I am using lottie-react-native v2.5.10 with lottie-ios set to 2.5.3. Interestingly, the UnknownClass error disappears as soon as I switch to 3.0.4 |
I am using Storyboard as well and added an |
@StefanLdhl Worked for me, thanks! |
I've been trying to figure out how to use a
LOTAnimationView
in Interface Builder so I can be consistent with how the rest of my app is set up. I'd also like to take advantage of auto layout in IB instead of having to hard code aframe
for anyLOTAnimationView
I use.I'd like to propose implementing
initWithCoder:
onLOTAnimationView
and a helper method to assign an animation to said view.I could be thinking about this incorrectly if so I'd love to hear how I'd use a
LOTAnimationView
in IB. Otherwise, would you be open to me submitting a PR?Thanks for reading!
Code Example
Use
LOTAnimationView
Check these before submitting:
This issue is a:
What Platform are you on?
The text was updated successfully, but these errors were encountered: