Skip to content

Instantly share code, notes, and snippets.

@lawreyios
Created May 13, 2020 10:15
Show Gist options
  • Save lawreyios/cc24c9e1cae6a5b1d1a424b448bb367e to your computer and use it in GitHub Desktop.
Save lawreyios/cc24c9e1cae6a5b1d1a424b448bb367e to your computer and use it in GitHub Desktop.
struct RedNavigationBar: ViewModifier {
var title: String
func body(content: Content) -> some View {
content
.navigationBarColor(.red, textColor: .white)
.navigationBarTitle(title)
}
}
struct GreenNavigationBar: ViewModifier {
var title: String
func body(content: Content) -> some View {
content
.navigationBarColor(.green, textColor: .blue)
.navigationBarTitle(title)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment