文档介绍:CS193P - Lecture 2
iPhone Application Development
Objective-C
Foundation Framework
Thursday, January 7, 2010 1
Announcements
• Enrollment process is almost done
• Shooting for end of day Friday
• Please drop the class in Axess if you are not enrolled.
Thursday, January 7, 2010 2
Office Hours
• David Jacobs
■ Mondays 4-6pm: Gates 360
• Paul Salzman
■ Some time. Best to try all possible times until you hit it
■ Some place, probably in Gates. e by and yell real loud
Thursday, January 7, 2010 3
iPhone SDK
• Enrolled students will be invited to developer program
■ Login to Program Portal
■ Request a Certificate
■ Download and install the SDK
• Will need your Device UDIDs - details e
• Auditors will need to sign up for Developer Program
independently
■ Free for Simulator development
■$99 for on-device development
Thursday, January 7, 2010 4
Getting Help
• The assignment walks you
through it
• Key spots to look
■ API & Conceptual Docs in Xcode
■ Class header files
■ Docs, sample code, tech notes
on Apple Developer Connection
(ADC) site
■ http://developer.
■ Dev site uses Google search
Thursday, January 7, 2010 5
Today’s Topics
• Questions from Tuesday or Assignments?
• Object Oriented Programming Overview
• Objective-C Language
• Common Foundation Classes
Thursday, January 7, 2010 6
Object Basics
Thursday, January 7, 2010 7
OOP Vocabulary
• Class: defines the grouping of data and code,
the “type” of an object
• Instance: a specific allocation of a class
• Method: a “function” that an object knows how to perform
• Instance Variable (or “ivar”): a specific piece of data
belonging to an object
Thursday, January 7, 2010 8
OOP Vocabulary
• Encapsulation
■ keep implementation private and separate from interface
• Polymorphism
■ different objects, same interface
• Inheritance
■ anization, share code, customize or extend
behaviors
Thursday, January 7, 2010 9
Inherit