21 lines
487 B
Swift
21 lines
487 B
Swift
import SwiftUI
|
|
|
|
struct AppBackgroundModifier: ViewModifier {
|
|
func body(content: Content) -> some View {
|
|
content.background(
|
|
LinearGradient(
|
|
colors: [Color(.systemGroupedBackground), Color.red.opacity(0.08)],
|
|
startPoint: .top,
|
|
endPoint: .bottom
|
|
)
|
|
.ignoresSafeArea()
|
|
)
|
|
}
|
|
}
|
|
|
|
extension View {
|
|
func appBackground() -> some View {
|
|
modifier(AppBackgroundModifier())
|
|
}
|
|
}
|