Skip to content

Instantly share code, notes, and snippets.

@gtzsb
gtzsb / RotatingGradient.swift
Created July 16, 2020 16:13
SwiftUI Rotating Gradient
import SwiftUI
import PlaygroundSupport
struct ContentView: View {
@State var gradientAngle: Double = 0
let colors: [Color] = [
.pink,
.red,
.orange,
@gtzsb
gtzsb / Gradient.swift
Created July 11, 2020 07:40
SwiftUI Gradient
import SwiftUI
import PlaygroundSupport
let gradient: Gradient = Gradient(colors: [.yellow, .green, .blue, .purple, .red])
extension Color {
public static let systemBackground: Color = Color(UIColor.systemBackground)
}
struct Shape: View {