[Swift] UI Challenge

Challenge 1: Card Style struct ContentView: View { var body: some View { ZStack { Color(.systemMint) .ignoresSafeArea() VStack(alignment: .leading, spacing: 20.0){ Image("eva") .resizable() .aspectRatio(contentMode: .fit) .cornerRadius(15) .padding(.all) HStack { Text("Eva Hsu") .font(.largeTitle) .fontWeight(.semibold) .foregroundColor(.black) .padding() Spacer() VStack { HStack { Image(systemName: "star.fill") Image(systemName: "star.fill") Image(systemName: "star.fill") Image(systemName: "star.fill") Image(systemName: "star.leadinghalf.fill") } .foregroundColor(.orange) .font(.caption) Text("(Reviews 240,152)") } .padding() } Text("The best girl in the world.") .foregroundColor(.primary) .padding(.horizontal) HStack { Spacer() Image(systemName: "binoculars.fill") Image(systemName: "fork.knife") } .foregroundColor(.gray) .font(.caption) .padding() } .background(Rectangle() .foregroundColor(.white) .cornerRadius(15) .shadow(radius: 15)) .padding() } } }m

June 21, 2024 · 1 分鐘 · Rain Hu