[SwiftUI] Gradient effect

Zion·2023년 5월 2일

struct ContentView: View {
    
    @State private var degrees = 0.0
    
    var body: some View {
        Text("Hi!\nI Luv U♥︎")
            .font(
                .system(
                    size: 80,
                    weight: .black,
                    design: .rounded
                )
            )
            .foregroundStyle(
                LinearGradient(
                    colors: [.yellow, .red],
                    startPoint: .topLeading,
                    endPoint: .bottomTrailing
                )
            )
    }
}

struct ContentView_Previews: PreviewProvider {
    static var previews: some View {
        ContentView()
    }
}
profile
어제보다만 나아지는

0개의 댓글