Join Todd Perkins for an in-depth discussion in this video Understanding variables, part of Programming for Non-Programmers with iOS 7.
…Variables are the most basic building blocks of programming.…So what are variables?…They are the nouns of programming.…And that means that they are named containers that hold data.…This data can be a number, text, or more complicated value.…For example, a user's score in a game would be held in a number variable.…In code, variables are created by declaring the data type.…
So, for example, if the variable is going to be a number,…you want to declare that the variable will be holding number data.…Variable has a name.…For example, if you're going to create a score…in a game, you could call that variable score.…You set the value of a variable using an equal sign.…And you end programming statements with a semicolon.…Think of it like a period in a sentence.…
So let's look at an example of a variable in code.…This line of code creates a number variable called…score and sets it to the value of 100.…The first word is int.…Int is the data type of a variable.…That says that the variable is going to be an integer, or a whole number.…
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 function
- 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 project1m 55s
2. Programming Building Blocks: Variables
3. Programming Building Blocks: Functions
4. Programming Building Blocks: Conditional Statements
Using conditional statements5m 21s
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?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
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.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.