Update to latest SwiftUI API. Indentation formatting.

This commit is contained in:
VAndrJ
2019-11-19 20:56:29 +02:00
parent 287aac0bcb
commit 502f2507c4

View File

@@ -27,18 +27,18 @@ struct ContentView : View {
var body: some View {
VStack() {
Text("Card in SwiftUI")
.color(.white)
.foregroundColor(.white)
.fontWeight(.bold)
.font(.largeTitle)
.padding(.top, show ? 30 : 20)
.padding(.bottom, show ? 20 : 0)
Text("Animatable cards with Spring, custom frame and some paddings. Also use SFSymbol for icon in the bottom button. Tap to button fo see fill style of this icon.")
.color(Color.white)
.foregroundColor(.white)
.multilineTextAlignment(.center)
.animation(.spring())
.cornerRadius(0)
.lineLimit(0)
.lineLimit(.none)
Spacer()
@@ -51,21 +51,21 @@ struct ContentView : View {
.font(Font.title.weight(.semibold))
.imageScale(.small)
Text(show ? "to Card" : "to Area")
.color(Color(hue: 0.498, saturation: 0.609, brightness: 1.0))
.foregroundColor(Color(hue: 0.498, saturation: 0.609, brightness: 1.0))
.fontWeight(.bold)
.font(.title)
.cornerRadius(0)
}
}
.padding(.bottom, show ? 20 : 15)
}
.padding()
.padding(.top, 15)
.frame(width: show ? 350 : 290, height: show ? 420 : 260)
.background(Color.blue)
.cornerRadius(30)
.animation(.spring())
.padding(.bottom, show ? 20 : 15)
}
.padding()
.padding(.top, 15)
.frame(width: show ? 350 : 290, height: show ? 420 : 260)
.background(Color.blue)
.cornerRadius(30)
.animation(.spring())
}
}