Skip to content

Commit

Permalink
feat(ViewsAndModifiers): add challenge 3
Browse files Browse the repository at this point in the history
  • Loading branch information
plskz committed Dec 11, 2022
1 parent 45340a3 commit 3f304fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
Binary file added 04-Views and Modifiers/Screenshots/Day 24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,8 @@ struct Title: ViewModifier {
func body(content: Content) -> some View {
content
.font(.largeTitle.bold())
.foregroundColor(.blue)
.padding()
.background(
LinearGradient(
gradient: Gradient(colors: [.blue, .teal]),
startPoint: .leading,
endPoint: .trailing
)
)
.cornerRadius(20)
.blur(radius: 0.5)
}
}

Expand All @@ -33,12 +25,12 @@ struct ContentView: View {
var body: some View {
ZStack {
RadialGradient(
gradient: Gradient(colors: [.blue, .black]),
gradient: Gradient(colors: [.teal, .black]),
center: .top,
startRadius: 20,
endRadius: 300
)
Text("Raccoons")
Text("Prominent Title")
.titleStyle()
}
.ignoresSafeArea()
Expand Down

0 comments on commit 3f304fa

Please sign in to comment.