Join Todd Perkins for an in-depth discussion in this video Solution: Create a counter app, part of Programming for Non-Programmers: iOS 8.
- View Offline
- Exercise Files
- Here is one of multiple possible solutions…to the challenge.…Now, I'm starting out in a blank,…single view project template file.…So I'm in Main.storyboard and we're going to need…a label and a button, so I'll search for the label…in Object Library, drag it out and expand it a little bit.…Then I'll do the same thing for a button.…I'll search for a button and then drag it out.…So I have my label and my button.…And I will go to the Assistant Editor, hide the Navigator…and Utilities areas, and then drag from my label…using the Ctrl key.…
Drag that right into my ViewController.swift file,…choose Outlet for the Connection.…We'll call this label and click Connect.…And I'll do the same thing for the button.…Ctrl drag from the button, into my code.…Change Outlet to Action, and for the name…I'll call this didClick and then I'll click Connect.…Now, I'll show the Navigator and return to the standard…editor, by clicking the buttons in the toolbar…and head back to ViewController.swift.…And here I'll also create a variable called clicks.…
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 method
- 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 project3m 38s
2. Programming Building Blocks: Variables
3. Programming Building Blocks: Functions
4. Programming Building Blocks: Conditional Statements
Using conditional statements4m 11s
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?
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.