View
Definition of view.
View
Definition of view.
0
0
Checkbox to mark video as read
Mark as read

Before starting to code our App we need to understand what is a View.

Without going into details, a View is an element that can be display on the screen. As we'll see in the following articles, the UI components Text, Image, or Button are also views that we can use to create our App.

A view can be just a container of other views as well.

ContentView

As you can see, the file ContentView is actually a View that will include other views, these are User Interface components or just UI components.

ContentView will be the first screen of our App.

Body

Every View that we create (we'll see later how to do this), will include the element var body: some View. So far, you only need to understand that every UI component that we want to add to our screen, will be placed inside the braces ({}) of this body.

var body: some View {
  Text("Hello World")
}

course

Quiz Time!

0 Comments

Join the community to comment
Sign Up
I have an account
Be the first to comment

Accept Cookies

We use cookies to collect and analyze information on site performance and usage, in order to provide you with better service.

Check our Privacy Policy