From the course: iOS 14 Development Essential Training
Unlock the full course today
Join today to access over 22,500 courses taught by industry experts or purchase this course individually.
Change a label's text at runtime
From the course: iOS 14 Development Essential Training
Change a label's text at runtime
- [Instructor] When you're working with storyboards, the way to connect a UI element to your code is through the view controller. So if we open up the document outline again, we can see our app's hierarchy, and so that view that we have is our whole visible area right there. But you may also notice that it's nested within something called a view controller. Now, a view controller refers to the code class that's controlling the view. So, iOS uses something called the model view controller design pattern, which essentially says, we need to keep visual things separate from functionality. So in the model view controller, visual things are called views, and functionality or responding to user interface events, et cetera, are contained in controllers, code files. And then the model part of model view controller refers to your data. And so, in this model view controller design pattern, or way of thinking, you keep the model, the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Choosing between SwiftUI and storyboards3m 4s
-
Drag-and-drop user interface creation with storyboards4m 31s
-
Change a label's text at runtime5m 4s
-
Handling a button press5m 14s
-
Using text gathered from text fields5m 33s
-
Showing the keyboards1m 44s
-
Dismissing the keyboard2m 49s
-
Working with pins4m 27s
-
Troubleshoot common UI problems6m 21s
-
Challenge: Storyboards1m 58s
-
Solution: Storyboards3m 59s
-
-
-
-
-