Home > AI > IOS > SwiftUI >

NavigationLink woking with Button

NavigationLink itself is a Button. You can apply ButtonStyle directly

NavigationLink(destination: WrapperView(contentView: FlashCardsListView())) {
    Text("Play", bundle: home.languageBundle)
        .font(home.fontTitle)
        .foregroundColor(.black)
        .padding()
    }
    .buttonStyle(MyButtonStyle(normalImg: "btn-empty-long-normal",
        pressedImg: "btn-empty-long-click"))

Leave a Reply