-
-
Save sturdysturge/f945625ffc599afee1bcb104f540f3f3 to your computer and use it in GitHub Desktop.
backgroundColor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension View { | |
func backgroundColor(_ color: Color) -> some View { | |
return self.background(color) | |
} | |
} | |
struct ContentView: View { | |
var body: some View { | |
Rectangle() | |
.backgroundColor(.blue) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment