Skip to content

Instantly share code, notes, and snippets.

@SwiftyAlex
Last active April 7, 2020 19:11
Show Gist options
  • Save SwiftyAlex/4ced027df47b8663cf113b33af84451e to your computer and use it in GitHub Desktop.
Save SwiftyAlex/4ced027df47b8663cf113b33af84451e to your computer and use it in GitHub Desktop.
// Container View
struct SomeView: View {
var body: some View {
VStack {
Text("Welcome to our SwiftUI app")
.modifier(CompanyHeaderLabel())
FeaturedContentView()
ArticlesScrollView()
FooterView()
}
}
}
// ViewModifier
struct CompanyHeaderLabel: ViewModifier {
func body(content: Content) -> some View {
content
.font(.custom("Montserrat-Bold", size: 16))
.foregroundColor(.textBlack)
.padding()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment