Answers for "swift navigation bar button"

3

add navigation bar button swiftui

.navigationBarItems(
    leading: Button(action: {
        // Actions
    }, label: { Text("Button") }),

    trailing: Button(action: {
    // Actions
    }, label: { Image("Icon") })
)
Posted by: Guest on March-14-2020
0

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)
    
    
  }

}
Posted by: Guest on January-07-2020

Code answers related to "swift navigation bar button"

Code answers related to "Swift"

Browse Popular Code Answers by Language