Chris
Chris

Reputation: 27

SwiftUI Form NavigationButton Style

How can I change the navigation button in form.

 Section {
     NavigationLink(
        destination: SignUpView(),
           label: {
            Text("Don't have an account?")
                .foregroundColor(.gray)
     })
 }

Result: enter image description here

Upvotes: 1

Views: 187

Answers (1)

Asperi
Asperi

Reputation: 257779

I think you just need to add that link as footer of previous Section (that one containing Forgot Password?), like

demo

Section(footer:
    HStack {
        Spacer()
        NavigationLink(
            destination: SignUpView(),
            label: {
                 Text("Don't have an account?")
                      .foregroundColor(.gray)
        })
    }) {

Tested and worked with Xcode 12.4 / iOS 14.4

Upvotes: 2

Related Questions