add navigation bar button swiftui
.navigationBarItems(
leading: Button(action: {
// Actions
}, label: { Text("Button") }),
trailing: Button(action: {
// Actions
}, label: { Image("Icon") })
)
add navigation bar button swiftui
.navigationBarItems(
leading: Button(action: {
// Actions
}, label: { Text("Button") }),
trailing: Button(action: {
// Actions
}, label: { Image("Icon") })
)
swiftui navigation button
ForEach (self.drinks, id: \.name)
{
drink in
//detail: The SwiftUI view you want to go to
NavigationLink(destination: DrinkDetail(drink: drink))
{
//the button/image you click on to go to that view
DrinkItem(drink: drink)
.frame(width: 300)
.padding(.trailing, 30)
}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us