Enum values are used similar to a custom data type. This video makes a case for their existence and shows how to create various enum values in code.
- [Instructor] So far, we've looked…at integers, strings, and a UI label…for data types of variables.…I want to show you a different data type…that can be useful for different modes of objects.…To paint a picture here, we're going to create…a calculator in this course, and the calculator is going…to be in a few different modes.…Addition, subtraction and multiplication.…So, I'm going to create a variable…inside of viewDidLoad here and demonstrate…what I'm talking about.…
So, I create a variable called mode.…And let's say that that's going…to be an integer.…And I set it equal to zero.…And let's say that this is going…to hold whether our calculator is…in addition mode, subtraction mode,…or multiplication mode.…So, I can have an integer representing…that value right now.…So, let's say in zero, it's not in any particular mode,…and if I wanted to change it on the next line…to addition, I could change that to one.…
And then I can use code to check to see…if mode is one, and if mode's one,…then the calculator is in addition mode.…
- 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.