blob: d6dcb12fbb2c4a5a8f2bf7b2c61c63b3d4971bc9 [file] [log] [blame]
// Created by Cal Stephens on 6/28/23.
// Copyright © 2023 Airbnb Inc. All rights reserved.
import Lottie
import SwiftUI
struct LottieViewLayoutDemoView: View {
var body: some View {
HStack {
VStack {
LottieView(animation: .named("Samples/LottieLogo1"))
.looping()
.frame(maxWidth: 100)
Text("maxWidth: 100")
}
VStack {
LottieView(animation: .named("Samples/LottieLogo1"))
.looping()
.frame(maxHeight: 100)
Text("maxHeight: 100")
}
VStack {
LottieView(animation: .named("Samples/LottieLogo1"))
.resizable()
.looping()
Text("resizable")
}
VStack {
LottieView(animation: .named("Samples/LottieLogo1"))
.looping()
Text("intrinsic content size")
}
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
}
}