An Introduction to

728
-1

Published on

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
728
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
4
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

An Introduction to

  1. 1. An Introduction iPhone Programming Stewart Gleadow, Thoughtworks Thursday, 5 August 2010
  2. 2. Barriers to Entry • Objective C • I can’t see my code for all the square brackets • Development Tools • I survived XCode and lived to tell the tale • Real Software? • Only people that don’t know how to program write iPhone Apps? Thursday, 5 August 2010
  3. 3. Learning the Hard Way • Memory Model • Get your memory management right the first time • Frameworks • Don’t fight the framework • View Lifecycles Thursday, 5 August 2010
  4. 4. User Interfaces • Interface Builder • Hand-rolled Controllers • NavigationController, TabController • UIViewController subclasses • UIView subclasses Thursday, 5 August 2010
  5. 5. Testing • Unit Testing • OCUnit, GTM Test, GHUnit • OCMock • Not on the iPhone? • Functional Testing • Instruments & UIAutomation • Manual Testing Thursday, 5 August 2010
  6. 6. iPhone Concerns • Persistence • Performance • Multiple Resolutions • Network Dropouts Thursday, 5 August 2010
  7. 7. Header @class ExtraClass; @interface SomeClass : NSObject { ExtraClass *extraClass_; } + (NSString *)classLevelMethod; - (id)initWithExtraClass:(ExtraClass *)extraClass; @property (nonatomic, retain) ExtraClass *extraClass; @end Thursday, 5 August 2010
  8. 8. Implementation #import “SomeClass.h” #import “ExtraClass.h” @interface SomeClass () @end @implementation SomeClass - (id)initWithExtraClass:(ExtraClass *)extraClass; { if (self = [super init]) { [self setExtraClass:extraClass]; } return self; } -(void)dealloc; { [extraClass_ release]; } @synthesize extraClass = extraClass_; @end Thursday, 5 August 2010
  9. 9. Using your Class ExtraClass *extraClass = [ExtraClass defaultExtraClass]; SomeClass *someClass = [[SomeClass alloc] initWithExtraClass:extraClass]; // do some stuff with your class ExtraClass *fromAccessor = [someClass extraClass]; [someClass release]; someClass = nil; Thursday, 5 August 2010
  10. 10. Looking Forward • Barriers to entry are more like hurdles • Objective C is not as bad as I thought • XCode 4 to save the day? • Don’t give up on testing Thursday, 5 August 2010
  11. 11. Demo Thursday, 5 August 2010
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×