Home > AI > IOS > SwiftUI >

RadientGradient

struct ContentView: View {
    var body: some View {
        let colors = Gradient(colors: [.red, .yellow, .green, .blue, .purple])
        let conic = RadialGradient(gradient: colors, center: .center, startRadius: 50, endRadius: 200)
        return Circle()
            .fill(conic)
            .frame(width: 400, height: 400)
    }
}

Leave a Reply