You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After creating an Xcode project, you should see a file that looks like this. This marks the entry point of our application - indicated by @main. The view we present inside WindowGroup is what will be displayed when the app first launches.
@main notifies our system that the application starts here.
The App protocol you see provides a (hidden) default implementation of the main() method which the system calls to launch.
Don't worry much about the details - it simply helps to know how the system processes your app.
PS: LandingView is a view we created to replace the default ContentView file. Our landing screen will be defined there.
We start off by centrally placing two buttons in the center. Each button takes in a title and action closure.
We could decide to provide a custom label for this button using the label closure: Button(action: { }) { (label goes here) }. We'll stick with a system button design using the buttonStyle view modifier. It allows us to neatly specify our button style by providing an object conforming to the PrimitiveButtonStyle protocol.