You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

27 lines
762 B

import SwiftUI
struct GradientTemplate<Content: View>: View {
var title: String
var content: () -> Content
var body: some View {
NavigationView {
ZStack {
surfaceColor()
VStack {
gradient.ignoresSafeArea(edges: .top).frame(height: 0)
Spacer()
}
content()
VStack {
Spacer()
Rectangle().frame(height: 0).background(gradient)
}
}
.navigationTitle(title)
.navigationBarTitleDisplayMode(.inline)
.statusBar(hidden: false)
}
.toolbar(.visible, for: .tabBar)
}
}