
Interested in developing applications for the world’s hottest smartphone? Want to expand your job possibilities? Ready to become an entrepreneur in the mobile industry?
Course Description
This course will teach you how to write iPhone applications using Objective-C and the Cocoa Touch framework. The goal is to get you through the learning curve of iPhone development: to give you the confidence and knowledge you need to jump into the mobile industry.![]()
Topics we will cover include:
- Objective-C
- Xcode and debugging
- Cocoa Touch View and Controller classes
- Interface Builder and application flow
- Fetching and storing data: disk, database, and web services
This course is based on materials from the MIT IAP 2009 course.
Schedule & Materials
- Friday, Oct 9: Overview
- Monday: Objective C Crash Course
- Slides: Introduction
- Slides: Objective C Crash Course
- Code Example: Creating objects
- Tuesday: Your First iPhone App; Application Flow
- Slides: Application Flow
- Code Example — Step 1: A Simple View
- Code Example — Step 2: Adding a UITabBarController
- Code Example — Step 3: Adding a UINavigationController
- Code Example — Step 4: Adding a UITableViewController
- Wednesday: Interface Builder; Viewing/Add/Editing Things
- Slides: Views and Interface Builder
- Code Example — Day 3 Starting Point: Yesterday’s code touched up a bit.
- Code Example — Day 3 Ending Point: After our in-class modifications.
- Thursday: Data: Property Lists, Databases, Defaults, Preferences, UI navigation state
- Slides: Data Persistence
- Code Example — Step 1: plist-driven Initialization.
- Code Example — Step 2: Nag Screens, Defaults, and Application Preferences.
- Phu’s code example: Saving and restoring the application’s UI navigation state using NSArchiver
- Friday: Event-based XML Parsing
- Slides: XPath
- Code Example — Step 1: Adding stubs to allow topic creation.
- XML Stubs: Topics and Messages.
- Code Example — Step 2: Loading topics from stub XML.
- Code Example — Step 3: Loading messages from stub XML.
- Additional topics: JSON framework, TouchXML + MultiNC extensions
- Monday, Oct 19: web API calls, assignment/competition
- Slides: HTTP
- In class, we demo’d fetching XML from our MultiNC server
- But MIT has: Code Example: Fetching a list of databases and tables from Intuit.
- Additional topics: CoreLocation, MKReverseGeocoder, augmented reality, animation and touch events
Notable questions from students
- What’s the difference between declaring a variable
idandNSObject *?- From StackOverflow: With a variable typed
id, you can send it any known message and the compiler will not complain. With a variable typedNSObject *, you can only send it messages declared by NSObject (not methods of any subclass) or else it will generate a warning. In general,idis what you want.
- From StackOverflow: With a variable typed
- Does every class have to inherit from
NSObject *?- From Apple:
NSObjectis the root class of most Objective-C class hierarchies. ThroughNSObject, objects inherit a basic interface to the runtime system and the ability to behave as Objective-C objects. For example, you can ask a NSObject subclass or instance thereof if it responds to a message before invoking a particular method. - From StackOverflow: There are a few that don’t, like NSProxy and the Objective-C classes (Protocol, Class). It is possible to write your own Objective-C classes that do not have a root object, but it involves calling the Objective-C runtime functions directly in order to properly allocate instances and register bits and pieces, which is not easy to do.
- From Apple:
- Does releasing an object automatically set it to nil?
- No, the object pointer still references an old memory address. Some people recommend you immediately set the pointer to nil so that if by accident you pass a message to that object, your program won’t crash and it will simply do nothing (it’s a no-op). The reason, in Objective-C passing a message to nil is ignored, unlike calling a method on a NULL pointer for example. But Huy’s personal opinion is it’s a bad idea to allow sending messages to nil anyway because you’re allowing the program to do something unexpected and you won’t know if you have a bug until very much later.
- Can you define class variables?
- From Apple: No, you should define an external variable of some sort. You can declare a variable in the class implementation file.
int MCLSGlobalVariable;
@implementation MyClass
// implementation continues
Or you can declare a variable as static and provide class methods to manage it. This limits its scope to that implementation file, so static variables cannot be inherited or manipulated by subclasses.
static MyClass *MCLSSharedInstance;
@implementation MyClass
+ (MyClass *)sharedInstance
{// check for existence of shared instance
// create if necessary
return MCLSSharedInstance;
}
// implementation continues
- To initialize class variables, read the documentation about Initialize a Class Object
- From Apple: No, you should define an external variable of some sort. You can declare a variable in the class implementation file.
- What is the difference between UIWindow and UIView?
- From Apple: The UIWindow class defines objects (known as windows) that manage and coordinate the windows an application displays on the screen. The two principal functions of a window are to provide an area for displaying its views and to distribute events to the views. The window is the root view in the view hierarchy. A window belongs to a level; the windows in one level appear above another level. For example, alerts appear above normal windows. Typically, there is only one window in an iPhone OS application.
Logistics
How?
This course is organized as a series of lectures and live coding sessions. Students are encouraged but not required to follow along on their computers during class and at home. A grade for this class is optional and will be given if the student submits an assignment. Classes will be mostly in English with teaching assistants available to translate and answer student questions in Vietnamese.
When?
Friday October 9 – Monday October 19, 2009
6:30PM – 8:30 PM
Where?
FPT-Aptech (sponsor for this course, but not affiliated with MultiUni)
46 Nguyen Van Thu, Q1, TP.HCM
Who’s teaching?
Huy Zing — studied at Caltech, worked at Oracle, taught at RMIT, Founder & CTO of MultiNC
with the assistance of native speakers
Khang Nguyen & Hoàng Xuân Phú — students at RMIT, iPhone developers at MultiNC
How much?
Free
How to register?
» Apply here → Registration is closed
How you can help
- Email this web page to your friends, or invite them to the Facebook Event for IT110.
- Post the flyer online or as hardcopy.
Sponsors for this course
(Sponsors are not affiliated with MultiUni which is an independent community-run organization)
![]() |
![]() |


