LottieView
public struct LottieView : UIViewRepresentable
This view is to show the animation for lotti files
-
Animation file name
Declaration
Swift
var animationFileName: String
-
Loop mode for animation
Declaration
Swift
let loopMode: LottieLoopMode
-
Width of the animation
Declaration
Swift
var width: CGFloat
-
Height of the animation
Declaration
Swift
var height: CGFloat
-
Initializes the LottieView
- animationFileName: The name of the animation file
- loopMode: The loop mode for the animation
- width: The width of the animation
- height: The height of the animation
Declaration
Swift
public init(animationFileName: String, loopMode: LottieLoopMode, width: CGFloat, height: CGFloat)
-
Updates the UI view
- uiView: The UI view to update
- context: The context of the view
Declaration
Swift
public func updateUIView(_ uiView: UIViewType, context: Context)
-
Creates the UI view
Declaration
Swift
public func makeUIView(context: Context) -> UIView
Parameters
context
The context of the view
Return Value
The created UI view