Instance variables are variables connected to a class. This video shows how to create them, including where they must reside in your code.
- [Todd] So here I've created a blank project.…Remember, you can go to File, New, Project…and choose single view application under iOS…to create the exact same project.…What we're going to do is create…something called instance variables.…In code these can be called ivars for short,…also known as properties.…So in programming you're going to hear many different terms…that often mean the same thing…and it can be kind of confusing,…but once you know the synonyms…it becomes much less confusing.…
So let's go create these instance variables here…by selecting ViewController.swift in the project navigator.…So we have in here what is called a class.…So we've got our code file right here…and this is called a class.…You can see this keyword right here that says class.…Really what that means is all the code…that you're going to write is going to reside…within the open curly brace…and the closed curly brace inside of this file.…Inside of the class there are two methods.…
We're going to talk about what…methods are a little bit later on,…
- 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.