0

enter image description here

How do I make a button like the blue one shown in the image?

Button("Done") {
}

enter image description here

1 Answer 1

2

It is a default style button and is managed by keyboard shortcut, like

var body: some View {
    HStack {
        Button("Done") {}
        Button("Clone") {}
            .keyboardShortcut(.defaultAction) // << here !!
    }
}

demo

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

1 Comment

Thx, if you have time I can ask you if you can take a look here, I would like to know your opinion. ;)

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.