Using LOTAnimationView with Auto Layout in Storyboard

value of type 'animationview' has no member 'setanimation'
unknown class animationview in interface builder file.
lottie-ios
lottie loop animation
lottie watchos
lottie splash screen ios
swift animation pod
lottie loader

Is there a way to use LOTAnimationView (Lottie framework) with auto layout? I tried setting the class of a UIView to LOTAnimationView in my storyboard, but getting nil IB outlet..

Take an outlet of LOTAnimatedControl.

Assign your JSON file to LOTAnimationView

lot.animationView.setAnimation(named: "checked_done_")

Complete example:

import UIKit
import Lottie

class ViewController: UIViewController {
    @IBOutlet weak var lot: LOTAnimatedControl!
    override func viewDidLoad() {
        super.viewDidLoad()
        lot.animationView.setAnimation(named: "youranimationjsonfile")
        lot.animationView.play()
    }
}

Hope this will help you.

I've been trying to figure out how to use a LOTAnimationView in I'd also like to take advantage of auto layout in IB instead of having to hard code a frame f. Add a view to a nib/storyboard set its class to LOTAnimationView  Auto Layout manage the position and the size of the views. To animate a View the auto layout constraints can be updated using an outlet. In this tutorial the Auto Layout constraints will be updated to move a view offscreen. This tutorial is made with Xcode 11 and built for iOS 13. Open Xcode and create a new Single View App.

Should be set like this in latest Lottie version:

and set animation name here:

and here is example code:

import UIKit
import Lottie

class ViewController: UIViewController {

    @IBOutlet weak var animationView: AnimationView!

    override func viewDidLoad() {
        super.viewDidLoad()

        animationView.play()

    }
}

I'd also like to take advantage of auto layout in IB instead of having to hard Use. Add a view to a nib/storyboard set its class to LOTAnimationView; Add an  Create a UIScrollView using Auto Layout in Storyboard for Xcode 9 - Duration: 14:13. Paul Solt 80,643 views. 14 Auto Layout Best Practices for Xcode 9 and iOS 11 (using Storyboards)

Update for the latest Lottie version with Ashish Kakkad's comment.

Change class name AnimationView instead of LOTAnimatedControl,

and then set property animationName from Interface Builder

Select Main.storyboard and then View Controller Scene in the Document Outline. Make sure to enable Use Auto Layout, Use Trait Variations  Using LOTAnimationView with Auto Layout in Storyboard Should be set like this in latest Lottie version: and set animation name here: and here is example code: import UIKit import Lottie class ViewController: UIViewController { @IBOutlet weak var animationView: AnimationView!

With this in mind, you can use Auto Layout in two forms: via the Storyboard or programmatically. I'm sure every developer has tried making an app  Create a UIScrollView using Auto Layout in Storyboard for Xcode 9 Learn how to create a UIScrollView that can contain more content than fits on the screen using this tutorial. 1.

In this video, you'll learn about constraints,what they are, and how to use them Interface Duration: 18:36 Posted: Feb 9, 2017 14 Auto Layout Best Practices for Xcode 9 and iOS 11 (using Storyboards) - Duration: 22:33. Paul Solt 46,995 views

A introduction tutorial to using auto layout with storyboard in Xcode. The tutorial covers how to Duration: 12:35 Posted: Jun 11, 2017 English, for example, uses a left-to-right layout direction, and Arabic and Hebrew use a right-to-left layout direction. In general, the order of the user interface elements should match the