Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
An IntroductioniPhone Programming  Stewart Gleadow, Thoughtworks
Barriers to Entry• Objective C   •   I can’t see my code for all the square brackets• Development Tools   •   I survived X...
Learning the Hard Way• Memory Model   •   Get your memory management right the first time• Frameworks   •   Don’t fight the ...
User Interfaces• Interface Builder• Hand-rolled Controllers    •   NavigationController, TabController    •   UIViewContro...
Testing• Unit Testing    •   OCUnit, GTM Test, GHUnit• OCMock    •   Not on the iPhone?• Functional Testing    •   Instrum...
iPhone Concerns• Persistence• Performance• Multiple Resolutions• Network Dropouts
Header@class ExtraClass;@interface SomeClass : NSObject{  ExtraClass *extraClass_;}+ (NSString *)classLevelMethod;- (id)in...
Implementation#import “SomeClass.h”#import “ExtraClass.h”@interface SomeClass ()@end@implementation SomeClass- (id)initWit...
Using your ClassExtraClass *extraClass = [ExtraClass defaultExtraClass];SomeClass *someClass =  [[SomeClass alloc] initWit...
Looking Forward• Barriers to entry are more like hurdles    •   Objective C is not as bad as I thought    •   XCode 4 to s...
Demo
Upcoming SlideShare
Loading in …5
×

Beginning iPhone Development

2,697 views

Published on

Short presentation talking about Objective C and iPhone development about 6 weeks after I started

Published in: Technology
  • Be the first to comment

Beginning iPhone Development

  1. 1. An IntroductioniPhone Programming Stewart Gleadow, Thoughtworks
  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?
  3. 3. Learning the Hard Way• Memory Model • Get your memory management right the first time• Frameworks • Don’t fight the framework• View Lifecycles
  4. 4. User Interfaces• Interface Builder• Hand-rolled Controllers • NavigationController, TabController • UIViewController subclasses • UIView subclasses
  5. 5. Testing• Unit Testing • OCUnit, GTM Test, GHUnit• OCMock • Not on the iPhone?• Functional Testing • Instruments & UIAutomation • Manual Testing
  6. 6. iPhone Concerns• Persistence• Performance• Multiple Resolutions• Network Dropouts
  7. 7. Header@class ExtraClass;@interface SomeClass : NSObject{ ExtraClass *extraClass_;}+ (NSString *)classLevelMethod;- (id)initWithExtraClass:(ExtraClass *)extraClass;@property (nonatomic, retain) ExtraClass *extraClass;@end
  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
  9. 9. Using your ClassExtraClass *extraClass = [ExtraClass defaultExtraClass];SomeClass *someClass = [[SomeClass alloc] initWithExtraClass:extraClass];// do some stuff with your classExtraClass *fromAccessor = [someClass extraClass];[someClass release];someClass = nil;
  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
  11. 11. Demo

×