1

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

2
  • Do you mean that you want to change its color to black? Commented Feb 4, 2021 at 12:23
  • No, sory for screenshot. I want to only text in form like as above. Commented Feb 4, 2021 at 12:30

1 Answer 1

2

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

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you this solution works great. But when I use .sheet in SignUpView, it automatically dismisses itself.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.