1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
| import SwiftUI
struct LocationView: View { var body: some View { ZStack { VStack { Text("I") .font(.system(size: 80)) Text("Text") .foregroundColor(.primary) .font(.largeTitle) HStack{ VStack(alignment: .center) { Text("Text") .foregroundColor(.primary) .font(.system(size: 18, weight: .bold, design: .rounded)) Text("Text".uppercased()) .foregroundColor(.primary) .font(.system(size: 12, weight: .regular, design: .rounded)) } Spacer() VStack(alignment: .center) { Text("Text") .foregroundColor(.primary) .font(.system(size: 18, weight: .bold, design: .rounded)) Text("Text".uppercased()) .foregroundColor(.primary) .font(.system(size: 12, weight: .regular, design: .rounded)) } Spacer() VStack(alignment: .center) { Text("Text") .foregroundColor(.primary) .font(.system(size: 18, weight: .bold, design: .rounded)) Text("Text".uppercased()) .foregroundColor(.primary) .font(.system(size: 12, weight: .regular, design: .rounded)) } } .padding() .foregroundStyle(LinearGradient(colors: [.blue, .indigo], startPoint: .top, endPoint: .bottom)) .background(.ultraThinMaterial, in: RoundedRectangle(cornerRadius: 12, style: .continuous)) VStack(alignment: .leading, spacing: 2) { Text("Text".uppercased()) .font(.headline) .foregroundColor(.primary) HStack(alignment: .top, content: { Text("Your text here.") .foregroundColor(.primary) .font(.caption) .multilineTextAlignment(.leading) .frame(width: 300, height: 32) Spacer() Text("Text") .foregroundColor(.primary) .font(.system(size: 12, weight: .bold)) }) .padding(.vertical) HStack { VStack(alignment: .center, content: { Text("Text") .foregroundColor(.primary) .font(.system(size: 24, weight: .bold, design: .rounded)) Text("Text".uppercased()) .foregroundColor(.primary) .font(.system(size: 12, weight: .regular, design: .rounded)) }) Spacer() VStack(alignment: .center, content: { Text("Text") .font(.system(size: 24, weight: .bold, design: .rounded)) .foregroundColor(.green) Text("Text".uppercased()) .foregroundColor(.primary) .font(.system(size: 12, weight: .regular, design: .rounded)) }) Spacer() VStack(alignment: .center, content: { Text("Text") .foregroundColor(.primary) .font(.system(size: 24, weight: .bold, design: .rounded)) Text("Text".uppercased()) .foregroundColor(.primary) .font(.system(size: 12, weight: .regular, design: .rounded)) }) } } .padding() .foregroundColor(Color.black.opacity(0.8)) .background(.ultraThinMaterial, in: RoundedRectangle(cornerRadius: 20, style: .continuous)) Text("Your text here.") .foregroundColor(.primary) .padding() .foregroundStyle(.black) .background(.ultraThinMaterial, in: RoundedRectangle(cornerRadius: 12, style: .continuous)) Button("Button"){ } .frame(width:100.0,height:50.0) .background(.tint) .foregroundColor(.white) .cornerRadius(30.0) .padding() } } } struct LocationView_Previews: PreviewProvider { static var previews: some View { LocationView() } } }
|