Join Todd Perkins for an in-depth discussion in this video Viewing the app's code structure, part of Programming for Non-Programmers with iOS 7.
…Before we start writing any code, let's take a look at what…our app's purpose is and how our code is going to be organized.…So first, the app plan.…We want to be able to tap numbers on the…calculator, and see them at the top of the screen.…Then you could tap the Plus or Minus button.…After you tap the Plus or Minus button, you can tap more…numeric buttons, and then press the Equals button to see the result.…In addition, you want to be able to tap the C…button the clear the screen, and reset the calculator's value to 0.…
To accomplish that, we're going to use several instance variables.…We're going to have one named Total that's…an integer, that will hold the numeric values entered.…We'll have one called mode, that will also be an…integer that holds whether the user is adding or subtracting.…We'll have another one that's Boolean, called lastButtonWasMode.…And it stores a true or false value that…stores if the mode button was the last button pressed.…Now the mode button is a plus or minus button.…
Next we'll have a variable called value string that is…
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.