Skip to content

Instantly share code, notes, and snippets.

@sturdysturge
Created June 13, 2022 22:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sturdysturge/c5b47293f05ef19997251cfe8eda99c5 to your computer and use it in GitHub Desktop.
Save sturdysturge/c5b47293f05ef19997251cfe8eda99c5 to your computer and use it in GitHub Desktop.
import SwiftUI
@available(iOS 16.0, *)
extension AnyGradient: View {
public var body: some View {
Rectangle().fill(self)
}
}
@available(iOS 16.0, *)
struct ContentView: View {
var body: some View {
Color.red.gradient
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment