iPhone Development

Reviews
Shared by: Roberto Rossi
Stats
views:
16
rating:
not rated
reviews:
0
posted:
10/20/2009
language:
English
pages:
0
iPhone Development Cocoa Touch • Interface Builder • • Drag-’n-drop UI Lots of UI, little code • • Lots of work done for you Strictly MVC Note that there’s no code here, I just threw this together in five minutes in Interface Builder. • Lots of widgets, but not everything you will want! Custom widgets are easy Many simple animations • • Objective-C • • • • Strict superset of C OO, like C++ Bits of Smalltalk If the thought of learning a new language excites you, you’ll be OK! Largest obstacle, but not huge • • Apple has lots of example code I’ll help! @interface Movie : NSObject { NSString * title; NSString * studio; } - (NSString *)summary; @property (copy) NSString * title; @property (copy) NSString * studio; @end @implementation Movie @synthesize title; @synthesize studio; Quick example, just a class with t wo properties and a single function. Nothing iPhone here. Inherits from NSObject, which does all of the magic message passing stuff. stringWithFormat is like sprintf Note that getters and setters work alongside properties! - (NSString *)summary { return [NSString stringWithFormat:@"%@ by %@.", self.title, self.studio]; } @end Movie * myMovie = [[Movie alloc] init]; myMovie.title = @"Top Gun"; myMovie.studio = @"Paramount Pictures"; NSLog(@"%@", [myMovie summary]); The SDK • • • • Instruments = watch memory allocations, function calls, etc. with dtrace Simulator = obvious Xcode = the actual IDE: editor, build environment, etc IB = already introduced Documentation == Excellent Lots of tools Only for Mac OS X 2 GB, free download • • developer.apple.com or get it from me... University Program • If all else fails, you can use my key! Running apps on an actual device usually costs $100/developer for certificates and other related costs • • Apple has “University Dev. Program” Free, as long as a professor signs up Hardware Interaction • • • • Don’t know what you want to do OS 3.0 (beta) has new “accessory” API Can talk over Bluetooth+USB Need additional specs from Apple, emailed them last night Effort Required • • • • lots of apps == it’s easy! Lots of apps in the store Biggest road bump: Objective-C Second biggest: UI architecture After that, you’re golden Demo! (keep in mind, this was written over the course of a few hours, and has far to go!)

Shared by: Roberto Rossi
Other docs by Roberto Rossi
FTP Hosting About the Author
Views: 71  |  Downloads: 0
Fronter hosting
Views: 52  |  Downloads: 0
Free Web Hosting
Views: 34  |  Downloads: 3
Free Web Hosting Service for new SIP Members
Views: 27  |  Downloads: 0
Free Web Hosting Pros and Cons
Views: 22  |  Downloads: 0
Free Web Hosting Discussion About the Author
Views: 19  |  Downloads: 0
Free Podcast Hosting Sites
Views: 25  |  Downloads: 0
Free Domain Name - Quick guide
Views: 16  |  Downloads: 0
Related docs