Join Todd Perkins for an in-depth discussion in this video Solution: Create two variables, part of Programming for Non-Programmers: iOS 8.
- View Offline
- Exercise Files
- Here is one of multiple possible solutions…for our challenge.…I'll go into Main.storyboard,…and in here I'm going to search for…a label in the object library,…and then I'll drag a label onto the screen,…and I'll drag a second label onto the screen.…I'll expand the areas for these labels…just a little bit,…and I'll want my name in the top one,…and my age in the bottom one.…So I'm going to open up the assistant editor,…and I can confirm that I'm looking in…ViewController.swift,…and I'm going to drag from the top label…holding control on my keyboard,…in between lines 12 and 13,…I'll call this label "Name",…click Connect,…and do the same thing for the other label.…
Control drag from the label right above label name,…in between lines 12 and 13,…I'll call this label "Age",…and then I'll click Connect.…Then I'll click ViewController.swift…in the project navigator,…go to the standard editor in the toolbar,…and hide the utilities area.…So I have label Name and label Age.…Inside of a viewDidLoad method,…I'm going to go right under the comment,…
If you find you'd like to learn more, see iOS App Development Essential Training, Foundations of Programming: Fundamentals, or any of the other programming courses in our library.
- Installing Xcode
- Creating an Xcode project
- Configuring the iOS Simulator
- Understanding variables
- Connecting visual objects to variables
- Understanding functions, methods, and selectors
- Connecting a button to a method
- Using conditional statements
- Setting up the user interface
- Connecting code elements to build an app
Skill Level Beginner
1. Setting Up Your Coding Environment
Creating an Xcode project3m 38s
2. Programming Building Blocks: Variables
3. Programming Building Blocks: Functions
4. Programming Building Blocks: Conditional Statements
Using conditional statements4m 11s
5. Building Your First Full Application
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.