Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
288 views
in Technique[技术] by (71.8m points)

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

question from:https://stackoverflow.com/questions/66045331/swiftui-form-navigationbutton-style

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...