Hello!
Yes I'm planning to do so.
And here is the code to the first view.
import SwiftUI
struct MainScreenView: View {
var body: some View {
NavigationView{
//VStack for Dinner and movie buttons
VStack{
//Navigation link for going to dinner page
NavigationLink {
DinnerView()
} label: {
ZStack{
Image("dinner")
.resizable()
.cornerRadius(20)
.shadow(radius:15)
.offset(y:12)
Text("Dinner")
.font(.system(size:70))
.fontWeight(.bold)
.foregroundColor(Color.white)
}
}
.padding()
//Navigation link for going to movie page
NavigationLink{
MovieView()
} label: {
ZStack{
Image("movie")
.resizable()
.resizable()
.cornerRadius(20)
.shadow(radius:15)
.offset(y:-5)
Text("Movie")
.font(.system(size:70))
.fontWeight(.bold)
.foregroundColor(Color.white)
}
}
.padding()
}
.background(Image("beige"))
.navigationTitle("Tonight's plan?")
.navigationBarItems(leading: NavigationLink {
NotificationView()
} label: {
Image(systemName: "bell.fill")
.font(.system(size:25))
.fontWeight(.bold)
.foregroundColor(Color.red)
.shadow(radius: 20)
})
.navigationBarItems(trailing: NavigationLink {
SettingView()
} label: {
Image(systemName: "person.crop.circle")
.font(.system(size:25))
.fontWeight(.bold)
.foregroundColor(Color.red)
})
}
}
struct MainScreenView_Previews: PreviewProvider {
static var previews: some View {
MainScreenView()
}
}
}
Post
Replies
Boosts
Views
Activity
Nvm
I'm thinking of B but if B doesn't work, A could work too
I'm thinking of B but if B doesn't work, A could work too
I'm using NavigationStack by the way