Programming iOS - Developing Applications for iPhone and iPad

10 class meetings.
6:30pm to 10:00pm Wednesday nights.

If you are a developer who wants to write applications that run on the iPhone or iPad, you should attend this class.

In 10 evenings, Programming iOS will teach you to create iOS applications like the ones you use on your iPhone every day. The class focus is on solid iOS Programming fundamentals which will serve you well in any context.

After an introduction to the Objective-C and Swift programming languages and the Foundation framework, we look in depth at the tools and the Classes that make up the iOS UI framework. We draw on the screen using UIKit, Core Graphics and Core Animation. We cover multi-touch event handling and the setup and configuration of a server in the cloud at AWS (Amazon Web Services) to support backend components of iOS applications. Your class assignments will interact with this server in a practical and real-world manner.

This course can be taught onsite for your company. Dave has taught this class for, LiveNation/TicketMaster, and many other smaller companies and individuals.

Lecture 4 - UIViewController, UINavigationController and UITabBarController - 10/18/2017

In this lecture, we will first wrap up our discussion of delegation, then will look at view controllers and classes that act as parents to UIViewControllers.

UINavigationController is a class that maintains a stack of view controllers, and presents the user with the option to move deeper into a hierarchy of data, then move back up the hierarchy by using a back button. Generally as you navigate up and down the stack, the .view property of the UIViewController slides in from the right, and slides off the right hand side of the screen as you navigate back.

UITabBarController is best used when you have distinct sections in your application. Each tab may have a different look at the same data, or it might be completely distinct, such as a "Settings" page.

The "Music" app and the "App Store" app are good examples of applications that make extensive use of both tabs and a navigation stack. Please spend some time in these apps, paying attention to layout and behavior of the UI elements.

To present anything on the iOS screen, it is important to have a clear understanding of the UIViewController Class instance methods:
  • -initWithNibName:Bundle
  • -loadView
  • -viewDidLoad
  • -viewWillAppear
  • -viewDidAppear
  • -viewWillDisappear
  • -viewDidDisappear
and properties:
  • .view
  • .title
  • .parentViewController
  • .navigationController
  • .tabBarController

Homework 4: UITabBarController
In this lab, you will investigate UITabBarController, which contains an array of UIViewControllers. The UITabBarController manages the display of the .view property of each UIViewController held on each tab.
  • Create an iphone or ipad application using the view-based template.
  • Wipe out the viewcontroller scene in the storyboard file, and the corresponding source code files(s).
  • Add three new ViewController objects to the storyboard
  • Draw a box around all the ViewController objects in the storyboard, then choose Editor/Embed In/Tab Bar Controller
  • Create three new ViewController classes as listed below
  • Highlight each viewController, then change the class name to your three new ViewController classes
  • In the first tab, implement a UINavigationContoller that holds a UITableView showing your favorite musicians. Slide in a detail screen with more information about the musician when a row is clicked.
  • On the second tab, display a scrollable UIImageView with a world map that is larger than the physical screen on the device. You will need the UIScrollViewDelegate for this to function correctly.
  • On the third tab, display a UIWebView implemented as the .view property of a custom UIViewController. Display your favorite g-rated website in the view.

As a tip to help you complete the lab, consider implementing each view controller in a small application independently. After each small application is complete and working properly, then add them to the homework assignment.

Lecture 3 - Foundation collection Classes, delegation introduction - 10/11/2017

In this lecture, the Foundation classes NSArray and NSDictionary are covered in more detail.

The design pattern of delegation that allows objects to communicate with each other is discussed. The delegate design pattern is demonstrated through implementation of a basic UITableView object and through implementing a .delegate property on a custom class.

This link to the Cocoa Fundamentals Guide at is largely targeted to the Mac platform. It is a nice overview of the communication mechanisms found in Cocoa:

Homework 3: Investigating delegation and the UITableView

The purpose of this homework assignment is to gain more practice working with delegation and the UITableView class.

Hopefully you will have fun with the assignment and will experiment outside of the homework requirements, for example by adding a custom view to the UITableviewCell or by changing the appearance of the cell. This one could take up some time as some of the concepts may be unfamiliar.

  • Create an iPhone or iPad application using view-based template
  • Add an NSArray of items to be displayed on the screen
  • Add a UITableView to the screen
  • Add the appropriate delegate methods to support the UITableView drawing
  • After you get the tableview to work properly, add the appropriate delegate method to change the height of each UITableViewCell to be 100 points.

This assignment will take some time, but will be a foundation for many iphone projects.

Video: Homework 3 - Delegation and UITableView

Lecture 2 - More Objective-C and Swift, Specialized UIView Objects, Target/Action - 10/4/2017

In this lecture, we review the startup process of an iOS application from main() to the UIApplicationDelegate's application: didFinishLaunchingWithOptions: method. We continue to investigate Objective-C and Swift classes including methods and properties.

The UIView hierarchy is reviewed, and more of the properties of UIView are discussed. A few specialized UIView objects are demonstrated, such as UIImageView and UIWebView.

The target/action pattern is introduced and an example of this pattern is demonstrated with a UIButton.

This wikipedia link on Target/Action might be interesting to check out. The 'target' of the UIButton will typically be the UIViewController, and the 'action' will be a method that has been defined by the programmer in the UIViewController.

Homework 2: Specialized UIViews and Target/Action
  • Create an iphone application using the view-based template
  • Place a UITextField, UILabel and UIButton into the view hierarchy
  • Define a method that reads the contents of the UITextField and sets the .text property of the UILabel
  • Use target/action on the UIButton to call your method when the TouchUpInside event is fired

Video: Homework 2 - Target/Action

Lecture 1 - iOS Platform, Objective-C and Swift 4.0 - 9/27/2017

In this lecture, practical iOS development is introduced. A sample application named 'learning-ios-first-app' is created to introduce the Objective-C language and its basic elements.

Objective-C is an programming language that features extensions of the ANSI C language. These extensions that have been added are mostly centered around object-oriented programming: creating Classes and working with methods on the Classes.

The following foundational programming topics are discussed:
Declaring constants and variables Control of program flow Comments Datatypes The following Objective-C syntax extensions should be reviewed:
  • @interface
  • @implementation
  • @property
  • [ ] (square brackets)
  • #import
  • - (minus sign to mark an instance method)
  • + (plus sign to mark an class method)
  • The @ sign as a shortcut - for example, @"Hello, World" creates an instance of an NSString

Swift is a programming language released with iOS8 which has subsequently been updated to version 4. It is a more modern language and is similar to Java and C#. Devices must be running at least iOS7 to support a swift application, iOS9 and up has better support.

The Apple Swift website is a good place to start learning about Swift programming for iOS, as well as the Apple WWDC Site.

The following Swift concepts and keyword should be reviewed:
  • var
  • let

Homework 1: Contact Info, Setting Up Your Development Environment, Basic App
  • Send an email to Dave at with iOS in the subject line. This is important so your email address can be whitelisted.
  • Install the current production version of XCode (Version 9.0 as of 9/26/2017). This will likely need to be updated before our class is over. Use the "App Store" application on your Mac to find and download the free (quite large) XCode application.
  • Create an iphone application using the "Single View Application" template.
  • Display a red UIView object on the screen.
  • Add a touch event to move the UIView around the screen
  • Repeat once for Swift and once for ObjectiveC
  • Zip up the project folders and email them to Dave.
  • See the video(s) below for help! Note that the section on Swift needs an update in the video due to older syntax.

Video: Homework 1 - Getting Started with Objective-C and Swift
Note: This video needs to be updated for Swift 4.0! Coming soon.

Back to Top

XCode Projects - Class Demos, Examples and Homework Answers


Class Logistics

Previous Versions of iPhone and iPad iOS Development class

External Links

home Site Map Terms of Use Privacy Policy Client Directories