Outline
• Overview of Objective C
• Interface Builder and XCode
Outline
• Overview of Objective C
• Interface Builder and XCode
• iPhone App Store
History
History
• Started in 1980, layered on C language
History
• Started in 1980, layered on C language
• NeXT Licensed 1988
History
• Started in 1980, layered on C language
• NeXT Licensed 1988
• Added to Free Software Foundation GNU
in 1992
History
• Started in 1980, layered on C language
• NeXT Licensed 1988
• Added to Free Software Foundation GNU
in 1992
• Apple acquired NeXT in 1996
Language &
Development
• Needs header files (*.h) and implementation files (*.m)
• Can mix C and Objective C
• Cocoa enforces MVC framework
• Can also write OpenGL applications
Tools
XCode Interface Builder
Tools to develop iPhone/Mac applications is
free to anyone who runs a machine with OS X
UINavigation Elements
Demo
Interface Builder
Mode Attribute
• Define how the object will be aligned inside the view.
Tag
• Language-independent way of identifying objects on your interface.
• Multiple button using same method can be identified via tag
Opaque
• Tells iPhone OS that nothing below your view should be drawn and allows
iPhones’s drawing method to do some optimizations that speed up drawing
Clip Subviews
•If your view has subviews and this option is checked. Then only the portion of
your subview that is within the bound of your view is drawn.
•This option is turned off by default for performance reason.
Clear Context before Drawing
•iPhone will draw the entire area covered by the control in transparent black
before it actually draws the control.
Demo
Memory Management
iPhone version of Objective-C uses Retain/Release count
method to manage memory.
Retain count is affected by:
• alloc – NSString *label = [[NSString alloc] initWithString:@\"Label\"];
• copy – NSString *label2 = [label copy];
• new - Point *point = [Point new];
• retain – [label2 retain];
Balance retain count with release
• release – [label2 release];
Autorelease Object
•returned from factory method
•NSString *label = [NSString stringWithFormat:@\"label %d\", 2];
• get added to autorelease pool that is released at the end of the run
loop
Memory Usage
iPhone app has access to limited memory
• Memory warning via didReceiveMemoryWarning method
• Use Instruments to find leaks or performance enhancement.
• Use lazy loading
• Watch autorelease footprint
• If needed create autorelease pool
• Watch custom setter method
• Reuse memory
• Update existing object rather then creating new ones
• UITableView uses dequeueReusableCellWithIdentifier:
method
•Returns a reusable table-view cell object located by its
identifier
Demo
Developer Program
Developer Program
• $99 for individual
Developer Program
• $99 for individual
• $99 for company
Developer Program
• $99 for individual
• $99 for company
• $299 for enterprise
Developer Program
• $99 for individual
• $99 for company
• $299 for enterprise
• Meant for developers!
Beta Testing &
Distribution
Beta Testing &
Distribution
• Provisioning profiles
Beta Testing &
Distribution
• Provisioning profiles
• Can install development builds through XCode
Beta Testing &
Distribution
• Provisioning profiles
• Can install development builds through XCode
• Ad Hoc distribution for external beta testing
Beta Testing &
Distribution
• Provisioning profiles
• Can install development builds through XCode
• Ad Hoc distribution for external beta testing
• App Store - get in EARLY!
Approval Process
• Don’t add obscenities, pornography, etc
• Follow Apple Human Interface Guidelines
• Don’t collect data without user’s consent
• Don’t write malicious software
• Don’t write an app that Apple is already writing
Approval Process
iPhone 3.0
iPhone 3.0
• All Apps being reviewed in iPhone 3.0
iPhone 3.0
• All Apps being reviewed in iPhone 3.0
• Push Notifications
iPhone 3.0
• All Apps being reviewed in iPhone 3.0
• Push Notifications
• Internal Maps
iPhone 3.0
• All Apps being reviewed in iPhone 3.0
• Push Notifications
• Internal Maps
• Internal Mail
iPhone 3.0
• All Apps being reviewed in iPhone 3.0
• Push Notifications
• Internal Maps
• Internal Mail
• Streaming Video
Resources
• Stanford iPhone Development Class (iTunes)
• Programming in Objective-C 2.0
• Beginning iPhone Development
• The iPhone Developer’s Cookbook
• http://www.docstoc.com/docs/3731208/11-Performance
1 comments
Comments 1 - 1 of 1 previous next Post a comment