From the course: iOS 17 Development Essential Training

Unlock this course with a free trial

Join today to access over 22,800 courses taught by industry experts.

Change a label's text at runtime

Change a label's text at runtime

- [Instructor] With storyboards, controlling UI elements through code requires manually establishing connections between those UI elements and code objects. Here, we'll look at the steps necessary to connect a label to a variable to be able to control it at runtime. Before setting that up, you'll want to confirm that you're seeing values in the Attributes Inspector. At the time of this recording, the current version of Xcode has a bug. When you open up Xcode project files, you may notice sometimes that when you have an object selected inside of your storyboard that nothing shows up in the Attributes Inspector. You'll see that this is happening with this tab right here. If that happens, close the tab where it's not working, and the other tab should work. If that tab's not working, just go to the Project Navigator, go to another file, and then return to your storyboard, select UI objects, and you should see that the…

Contents