Solution: Create two variables


show more Solution: Create two variables provides you with in-depth training on Developer. Taught by Todd Perkins as part of the Programming for Non-Programmers: iOS 7 show less
please wait ...

Solution: Create two variables

There are multiple ways you could have approached this challenge. And as long as you arrive at the correct solution, any method you use can be correct. Here is the method that I used. In mainstoryboard.storyboard, I made sure that my utility view was showing, and then I clicked and dragged two labels onto the screen. So, there is one. And there is another label. Then, I created two variables, one for each label.

I did that in ViewController.h. At the end of line 11, I will go to the next line, create an open curly brace and type enter. And now I'm going to create an IBOutlet that is a UI label called name. At this point, we need two different UI labels. I'm going to show you a short cut to doing that. One way is, we can select this line and copy with Cmd+C. Go to the next line, paste the code with Cmd+V, and change name to age.

But since there are two variables that are the same data type, that is IBOutlet, UILabel. We actually have a short cut. I'll show you how to do that. Going to delete tha...

Solution: Create two variables
Video duration: 5m 14s 2h 25m Beginner

Viewers:

Solution: Create two variables provides you with in-depth training on Developer. Taught by Todd Perkins as part of the Programming for Non-Programmers: iOS 7

Subject:
Developer
Software:
iOS
Author:
please wait ...