From 502f2507c4a7a78537f1c544e38e3836410c2f6d Mon Sep 17 00:00:00 2001 From: VAndrJ Date: Tue, 19 Nov 2019 20:56:29 +0200 Subject: [PATCH] Update to latest SwiftUI API. Indentation formatting. --- Files/AreaToCard.swift | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/Files/AreaToCard.swift b/Files/AreaToCard.swift index dea2d02..803ff9c 100644 --- a/Files/AreaToCard.swift +++ b/Files/AreaToCard.swift @@ -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()) } }