mirror of
https://github.com/ivanvorobei/SwiftUI.git
synced 2026-04-24 09:38:36 +02:00
Update to latest SwiftUI API. Indentation formatting.
This commit is contained in:
@@ -27,18 +27,18 @@ struct ContentView : View {
|
|||||||
var body: some View {
|
var body: some View {
|
||||||
VStack() {
|
VStack() {
|
||||||
Text("Card in SwiftUI")
|
Text("Card in SwiftUI")
|
||||||
.color(.white)
|
.foregroundColor(.white)
|
||||||
.fontWeight(.bold)
|
.fontWeight(.bold)
|
||||||
.font(.largeTitle)
|
.font(.largeTitle)
|
||||||
.padding(.top, show ? 30 : 20)
|
.padding(.top, show ? 30 : 20)
|
||||||
.padding(.bottom, show ? 20 : 0)
|
.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.")
|
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)
|
.multilineTextAlignment(.center)
|
||||||
.animation(.spring())
|
.animation(.spring())
|
||||||
.cornerRadius(0)
|
.cornerRadius(0)
|
||||||
.lineLimit(0)
|
.lineLimit(.none)
|
||||||
|
|
||||||
Spacer()
|
Spacer()
|
||||||
|
|
||||||
@@ -51,21 +51,21 @@ struct ContentView : View {
|
|||||||
.font(Font.title.weight(.semibold))
|
.font(Font.title.weight(.semibold))
|
||||||
.imageScale(.small)
|
.imageScale(.small)
|
||||||
Text(show ? "to Card" : "to Area")
|
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)
|
.fontWeight(.bold)
|
||||||
.font(.title)
|
.font(.title)
|
||||||
.cornerRadius(0)
|
.cornerRadius(0)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
.padding(.bottom, show ? 20 : 15)
|
|
||||||
|
|
||||||
}
|
}
|
||||||
.padding()
|
.padding(.bottom, show ? 20 : 15)
|
||||||
.padding(.top, 15)
|
|
||||||
.frame(width: show ? 350 : 290, height: show ? 420 : 260)
|
}
|
||||||
.background(Color.blue)
|
.padding()
|
||||||
.cornerRadius(30)
|
.padding(.top, 15)
|
||||||
.animation(.spring())
|
.frame(width: show ? 350 : 290, height: show ? 420 : 260)
|
||||||
|
.background(Color.blue)
|
||||||
|
.cornerRadius(30)
|
||||||
|
.animation(.spring())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user