A clickable list item and a button question


I am trying to make a list item clickable on a mac.

And on some websites it says to use a button.

But because I am very new to Xcode/Swift I'm not sure if this is the right thing to use.

So what exactly is the right thing to use?

And if you have any links to tutorials that would be nice too.

And also, is there a GUI drag and drop toolbox that I can use to design mac apps?

Thank you!

Well I finally worked it out. So if anyone's interested.....

You use an onTapGesture.

And I'm just going to assume that everyone uses the Interface Builder for GUI stuff.

FYI, Interface Builder is used to build old UIKit or AppKit apps. SwiftUI has its own preview canvas built into Xcode that renders a preview of your UI and which you can then use to modify your views and have the corresponding code generated.

Oh okay.

Yeah one of the first things I do when I start a project is get rid of that default preview code because that preview takes up too much screen space and also seems to turn itself off a lot of the time.

When I'm done learning the basics of Swift I'll check it out further + The object library.

Thanks Jon.

Don’t delete the code, just turn off the preview. Command - Option - Return

Oh yeah, good to know.

Thanks again!