Sometimes it can be hard to visualize where certain code elements are used. This video shows an example application that uses several variables, and explains their roles in the app.
- [Narrator] Here is the app that we're going to build…in this course and the reason I'm showing you this now…is because I want to show you the roles that variables play…in a practical application.…In the app, we have modes defined for the calculator.…So we have these different cases…just like we set up in an earlier movie.…As I scroll down, you're going to see the list…of instance variables in here.…So there's a label for the calculator,…like we looked at setting up earlier.…There's a labelString variable right here…using the var keyword.…
There's a currentMode variable…that contains the current mode of the application…and it initializes to NOT SET.…We have an integer called savedNum that's 0…and we have a variable that's a new data type…we haven't talked about yet,…which is a Bool value,…short for Boolean, meaning true or false.…As I scroll down, you'll see ways in which…these variables are referenced throughout my code.…So here's the let keyword…declaring a value right here.…
The let keyword creating another value.…
- Installing Xcode
- Creating an Xcode project
- Configuring the iOS Simulator
- Understanding variables
- Connecting visual objects to variables
- Understanding methods
- Connecting a button to a method
- Using conditional statements
- Setting up the user interface (UI)
- Building a complete iOS app
Skill Level Beginner
1. Set Up Your Coding Environment
Create an Xcode project4m 19s
2. Programming Building Blocks: Variables
3. Programming Building Blocks: Methods
4. Programming Building Blocks: Conditional Statements
5. Plan and Prepare the App
6. Build a Full Application
Next steps3m 11s
- 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.