Introduction

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.

Unlock now

Creating user interfaces in SwiftUI isn’t just about composing views. It also involves modifying and setting up various state properties. These both combine to create apps that look good and behave as the use expects them to.

Both modifiers and state variables are two very different topics in SwiftUI. Modifiers allow you to customize your views such as increasing text size or adding padding. On the other hand, state properties are variables that trigger an app to refresh when they are modified.

SwiftUI also provides buttons. These buttons allow you to run code when the user taps it. Buttons work will with both modifiers and properties and provide an easy way to add interactivity to your app.

You’ll learn about all of these concepts and in the process, you will learn to:

  • Describe how to modify view such as a Text() or Image().
  • Explain the purpose of @State variables.
  • Identify how to add buttons to a layout.
See forum comments
Download course materials from Github
Next: Modifying Views