Your SlideShare is downloading. ×
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Frederick web meetup slides
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Frederick web meetup slides

1,920

Published on

Published in: Technology
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,920
On Slideshare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
48
Comments
0
Likes
4
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Transcript

    • 1. iOS Development
    • 2. iOS Development• About Me: • Pat Zearfoss • Mindgrub Technologies, LLC • BS Computer Science - UMBC 2008 • Working with mobile and iOS for 3 years.
    • 3. iOS Development• Web: pzearfoss@gmail.com http://zearfoss.wordpress.com @pzearfoss http://www.github.com/pzearfoss
    • 4. Development Options
    • 5. Development OptionsHTML 5
    • 6. Development OptionsHTML 5 Cross Platform
    • 7. Development OptionsHTML 5 Cross Platform Native
    • 8. HTML 5
    • 9. HTML 5• Use the technologies you already know.
    • 10. HTML 5• Use the technologies you already know.• Can be loaded into an app webview and distributed on the app store.
    • 11. HTML 5• Use the technologies you already know.• Can be loaded into an app webview and distributed on the app store.• Limited use of device hardware.
    • 12. HTML 5• Use the technologies you already know.• Can be loaded into an app webview and distributed on the app store.• Limited use of device hardware.• Cross Platform
    • 13. HTML 5• Use the technologies you already know.• Can be loaded into an app webview and distributed on the app store.• Limited use of device hardware.• Cross Platform • Except for all the cross browser problems you already know and love.
    • 14. Cross PlatformFrameworks
    • 15. Cross Platform Frameworks• Titanium, PhoneGap, Others
    • 16. Cross Platform Frameworks• Titanium, PhoneGap, Others• Use the technologies you already know.
    • 17. Cross Platform Frameworks• Titanium, PhoneGap, Others• Use the technologies you already know.• Titanium generates native code.
    • 18. Cross Platform Frameworks• Titanium, PhoneGap, Others• Use the technologies you already know.• Titanium generates native code.• PhoneGap uses web code in a webview.
    • 19. Cross Platform Frameworks• Titanium, PhoneGap, Others• Use the technologies you already know.• Titanium generates native code.• PhoneGap uses web code in a webview.• Better use of device hardware.
    • 20. Cross Platform Frameworks• Titanium, PhoneGap, Others• Use the technologies you already know.• Titanium generates native code.• PhoneGap uses web code in a webview.• Better use of device hardware.• “Cross Platform”
    • 21. Cross Platform Frameworks• Titanium, PhoneGap, Others• Use the technologies you already know.• Titanium generates native code.• PhoneGap uses web code in a webview.• Better use of device hardware.• “Cross Platform” • Your mileage may vary.
    • 22. Native
    • 23. Native• Offers the most control over your product.
    • 24. Native• Offers the most control over your product.• Access to all device frameworks.
    • 25. Native• Offers the most control over your product.• Access to all device frameworks.• Requires Objective-C
    • 26. Native• Offers the most control over your product.• Access to all device frameworks.• Requires Objective-C• Only runs on iOS (obviously)
    • 27. Native• Offers the most control over your product.• Access to all device frameworks.• Requires Objective-C• Only runs on iOS (obviously)• Will generally run with the absolute best performance.
    • 28. Xcode• Download from App Store $4.99 Download
    • 29. Xcode• Download from App Store $4.99 Download
    • 30. Xcode• Download from App Store $4.99 Download 4.1 is now free
    • 31. Getting Started
    • 32. Getting Started• Things you should know
    • 33. Getting Started• Things you should know • Classical OO
    • 34. Getting Started• Things you should know • Classical OO • Classes
    • 35. Getting Started• Things you should know • Classical OO • Classes • Inheritance
    • 36. Getting Started• Things you should know • Classical OO • Classes • Inheritance • Polymorphism
    • 37. Getting Started
    • 38. Getting Started• Recommended but not required
    • 39. Getting Started• Recommended but not required • Some knowledge of C
    • 40. Getting Started• Recommended but not required • Some knowledge of C • malloc() . . . free() ?
    • 41. Getting Started• Recommended but not required • Some knowledge of C • malloc() . . . free() ? • Some knowledge of design patterns:
    • 42. Getting Started• Recommended but not required • Some knowledge of C • malloc() . . . free() ? • Some knowledge of design patterns: • MVC, Singleton, Delegation
    • 43. Objective-C in 10 minutes
    • 44. About Objective-C
    • 45. About Objective-C• Object Oriented superset over C
    • 46. About Objective-C• Object Oriented superset over C Standard C
    • 47. About Objective-C• Object Oriented superset over C Standard C Objective-C
    • 48. About Objective-C• Object Oriented superset over C Standard C Objective-C• Anything that works in C will work in Objective-C
    • 49. Obj-C in 10 minutes
    • 50. Obj-C in 10 minutes• All the things you know from C
    • 51. Obj-C in 10 minutes• All the things you know from C• Variables are typed:
    • 52. Obj-C in 10 minutes• All the things you know from C• Variables are typed: • int, float, double, char
    • 53. Obj-C in 10 minutes• All the things you know from C• Variables are typed: • int, float, double, char int foo = 5;
    • 54. Obj-C in 10 minutes• All the things you know from C• Variables are typed: • int, float, double, char int foo = 5; • Separate compilation
    • 55. Obj-C in 10 minutes• All the things you know from C• Variables are typed: • int, float, double, char int foo = 5; • Separate compilation • .h for interface declaration
    • 56. Obj-C in 10 minutes• All the things you know from C• Variables are typed: • int, float, double, char int foo = 5; • Separate compilation • .h for interface declaration • .m for implementation (instead of .c)
    • 57. Obj-C in 10 minutes
    • 58. Obj-C in 10 minutes• Functions / Methods have return types and typed arguments
    • 59. Obj-C in 10 minutes• Functions / Methods have return types and typed arguments int sumOfItems(int i, int j) { return i + j; }
    • 60. Obj-C in 10 minutes• Functions / Methods have return types and typed arguments int sumOfItems(int i, int j) { return i + j; }• Other types
    • 61. Obj-C in 10 minutes• Functions / Methods have return types and typed arguments int sumOfItems(int i, int j) { return i + j; }• Other types • void, NULL
    • 62. Obj-C in 10 minutes• Functions / Methods have return types and typed arguments int sumOfItems(int i, int j) { return i + j; }• Other types • void, NULL • pointers to types (int *, void *)
    • 63. Obj-C in 10 minutes
    • 64. Obj-C in 10 minutes• Objective-C Additions:
    • 65. Obj-C in 10 minutes• Objective-C Additions: • BOOL - YES / NO
    • 66. Obj-C in 10 minutes• Objective-C Additions: • BOOL - YES / NO BOOL isSet = YES;
    • 67. Obj-C in 10 minutes• Objective-C Additions: • BOOL - YES / NO BOOL isSet = YES; • id - strictly a pointer to an object
    • 68. Obj-C in 10 minutes• Objective-C Additions: • BOOL - YES / NO BOOL isSet = YES; • id - strictly a pointer to an object • nil - a zero’d out pointer
    • 69. Obj-C in 10 minutes• Objective-C Additions: • BOOL - YES / NO BOOL isSet = YES; • id - strictly a pointer to an object • nil - a zero’d out pointer • nil != (necessarily) NULL or 0
    • 70. Obj-C in 10 minutes
    • 71. Obj-C in 10 minutes• Classes
    • 72. Obj-C in 10 minutes• Classes • Exist as a class pair
    • 73. Obj-C in 10 minutes• Classes • Exist as a class pair • Instance variables and instance methods act on an instance object
    • 74. Obj-C in 10 minutes• Classes • Exist as a class pair • Instance variables and instance methods act on an instance object • Class (static) methods act on the class object
    • 75. Obj-C in 10 minutes• Classes • Exist as a class pair • Instance variables and instance methods act on an instance object • Class (static) methods act on the class object • There is only ever one class object at any given time
    • 76. Obj-C in 10 minutes• Classes • Exist as a class pair • Instance variables and instance methods act on an instance object • Class (static) methods act on the class object • There is only ever one class object at any given time • Class variables really don’t exist
    • 77. Obj-C in 10 minutes• Classes #import <Foundation/Foundation.h> @interface MyClass : NSObject { id aChildObject; NSArray *someItems; } + (NSString *)className; - (void)logMe; @property (nonatomic, retain) id aChildObject; @end
    • 78. Obj-C in 10 minutes• Classes Include a header #import <Foundation/Foundation.h> file @interface MyClass : NSObject { id aChildObject; NSArray *someItems; } + (NSString *)className; - (void)logMe; @property (nonatomic, retain) id aChildObject; @end
    • 79. Obj-C in 10 minutes• Classes #import <Foundation/Foundation.h> Declare interface @interface MyClass : NSObject extends { NSObject id aChildObject; NSArray *someItems; } + (NSString *)className; - (void)logMe; @property (nonatomic, retain) id aChildObject; @end
    • 80. Obj-C in 10 minutes• Classes #import <Foundation/Foundation.h> @interface MyClass : NSObject { id aChildObject; Class instance NSArray *someItems; variables } + (NSString *)className; - (void)logMe; @property (nonatomic, retain) id aChildObject; @end
    • 81. Obj-C in 10 minutes• Classes #import <Foundation/Foundation.h> @interface MyClass : NSObject { id aChildObject; NSArray *someItems; } A class (static) + (NSString *)className; - (void)logMe; method @property (nonatomic, retain) id aChildObject; @end
    • 82. Obj-C in 10 minutes• Classes #import <Foundation/Foundation.h> @interface MyClass : NSObject { id aChildObject; NSArray *someItems; } + (NSString *)className; - (void)logMe; An instance method @property (nonatomic, retain) id aChildObject; @end
    • 83. Obj-C in 10 minutes• Classes #import <Foundation/Foundation.h> @interface MyClass : NSObject { id aChildObject; NSArray *someItems; } A declared + (NSString *)className; property - (void)logMe; @property (nonatomic, retain) id aChildObject; @end
    • 84. Obj-C in 10 minutes• Classes #import <Foundation/Foundation.h> @interface MyClass : NSObject { id aChildObject; NSArray *someItems; } + (NSString *)className; - (void)logMe; @property (nonatomic, retain) id aChildObject; Close the @end interface block
    • 85. Obj-C in 10 minutes• Classes #import <Foundation/Foundation.h> @interface MyClass : NSObject { id aChildObject; NSArray *someItems; } + (NSString *)className; - (void)logMe; @property (nonatomic, retain) id aChildObject; @end
    • 86. Obj-C in 10 minutes• Classes #import "MyClass.h" @implementation MyClass @synthesize aChildObject; - (id)init { self = [super init]; if (self) { someItems = [[NSArray alloc] init]; } return self; }
    • 87. Obj-C in 10 minutes• Classes Include a header #import "MyClass.h" file @implementation MyClass @synthesize aChildObject; - (id)init { self = [super init]; if (self) { someItems = [[NSArray alloc] init]; } return self; }
    • 88. Obj-C in 10 minutes• Classes #import "MyClass.h" Begin @implementation MyClass implementation @synthesize aChildObject; block - (id)init { self = [super init]; if (self) { someItems = [[NSArray alloc] init]; } return self; }
    • 89. Obj-C in 10 minutes• Classes #import "MyClass.h" @implementation MyClass Auto-generate @synthesize aChildObject; property - (id)init { self = [super init]; if (self) { someItems = [[NSArray alloc] init]; } return self; }
    • 90. Obj-C in 10 minutes• Classes #import "MyClass.h" @implementation MyClass @synthesize aChildObject; - (id)init Initializer { (constructor) self = [super init]; if (self) { someItems = [[NSArray alloc] init]; } return self; }
    • 91. Obj-C in 10 minutes• Classes #import "MyClass.h" @implementation MyClass @synthesize aChildObject; - (id)init { self = [super init]; if (self) { someItems = [[NSArray alloc] init]; } return self; }
    • 92. Obj-C in 10 minutes• Classes #import "MyClass.h" @implementation MyClass @synthesize aChildObject; - (id)init { Call to super self = [super init]; if (self) class { someItems = [[NSArray alloc] init]; } return self; }
    • 93. Obj-C in 10 minutes• Classes #import "MyClass.h" @implementation MyClass @synthesize aChildObject; - (id)init { self = [super init]; “new” an array if (self) { someItems = [[NSArray alloc] init]; } return self; }
    • 94. Obj-C in 10 minutes• Classes #import "MyClass.h" @implementation MyClass @synthesize aChildObject; - (id)init { self = [super init]; if (self) { someItems = [[NSArray alloc] init]; } return self; }
    • 95. Obj-C in 10 minutes• Continued . . . - (void)dealloc { [aChildObject release]; [someItems release]; [super dealloc]; } - (void)logMe { NSLog(@"MyClass"); } + (NSString *)className { return NSStringFromClass([self class]); } @end
    • 96. Obj-C in 10 minutes• Continued . . . - (void)dealloc { Destructor [aChildObject release]; [someItems release]; [super dealloc]; } - (void)logMe { NSLog(@"MyClass"); } + (NSString *)className { return NSStringFromClass([self class]); } @end
    • 97. Obj-C in 10 minutes• Continued . . . - (void)dealloc { [aChildObject release]; [someItems release]; [super dealloc]; } - (void)logMe Instance method { implementation NSLog(@"MyClass"); } + (NSString *)className { return NSStringFromClass([self class]); } @end
    • 98. Obj-C in 10 minutes• Continued . . . - (void)dealloc { [aChildObject release]; [someItems release]; [super dealloc]; } - (void)logMe { NSLog(@"MyClass"); Class method } implementation + (NSString *)className { return NSStringFromClass([self class]); } @end
    • 99. Obj-C in 10 minutes• Continued . . . - (void)dealloc { [aChildObject release]; [someItems release]; [super dealloc]; } - (void)logMe { NSLog(@"MyClass"); } + (NSString *)className { return NSStringFromClass([self class]); End } implementation @end block
    • 100. Obj-C in 10 minutes• Continued . . . - (void)dealloc { [aChildObject release]; [someItems release]; [super dealloc]; } - (void)logMe { NSLog(@"MyClass"); } + (NSString *)className { return NSStringFromClass([self class]); } @end
    • 101. Obj-C in 10 minutes
    • 102. Obj-C in 10 minutes• What’s with all the ‘@’ and ‘[ ]’?
    • 103. Obj-C in 10 minutes• What’s with all the ‘@’ and ‘[ ]’?•@ • Objective-C keywords • Initializer for string constants
    • 104. Obj-C in 10 minutes• What’s with all the ‘@’ and ‘[ ]’?•@ • Objective-C keywords • Initializer for string constants• ‘[]’ • “Send a message to an object” • Like calling a method, but more dynamic
    • 105. Obj-C in 10 minutes
    • 106. Obj-C in 10 minutes• Method Calls (messages)
    • 107. Obj-C in 10 minutes• Method Calls (messages)• Names are intermixed with arguments:
    • 108. Obj-C in 10 minutes• Method Calls (messages)• Names are intermixed with arguments: • method definition - (void)setItems:(NSArray *)items childObject:(id)obj;
    • 109. Obj-C in 10 minutes• Method Calls (messages)• Names are intermixed with arguments: • method definition - (void)setItems:(NSArray *)items childObject:(id)obj; • method call [self setItems:[NSArray array] childObject:object];
    • 110. Obj-C in 10 minutes- (void)setItems:(NSArray *)items childObject:(id)obj;
    • 111. Obj-C in 10 minutes Return Type- (void)setItems:(NSArray *)items childObject:(id)obj;
    • 112. Obj-C in 10 minutes Return Type- (void)setItems:(NSArray *)items childObject:(id)obj; Method Name
    • 113. Obj-C in 10 minutes Return Type Arguments and Types- (void)setItems:(NSArray *)items childObject:(id)obj; Method Name
    • 114. Obj-C in 10 minutes[self setItems:[NSArray array] childObject:object];
    • 115. Obj-C in 10 minutesReceiver [self setItems:[NSArray array] childObject:object];
    • 116. Obj-C in 10 minutesReceiver [self setItems:[NSArray array] childObject:object]; Method Name
    • 117. Obj-C in 10 minutesReceiver Arguments [self setItems:[NSArray array] childObject:object]; Method Name
    • 118. Obj-C in 10 minutes
    • 119. Obj-C in 10 minutes• Protocols
    • 120. Obj-C in 10 minutes• Protocols • Analogous to interfaces @protocol MyProtocol <NSObject> - (void)protocolMethod; @property (nonatomic, retain) NSObject *anObject; @end
    • 121. Obj-C in 10 minutes• Protocols • Analogous to interfaces @protocol MyProtocol <NSObject> - (void)protocolMethod; @property (nonatomic, retain) NSObject *anObject; @end • Adopting a protocol @interface MyClass : NSObject <MyProtocol>
    • 122. Obj-C in 10 minutes• Categories - Something completely different• Add functionality to an existing class @interface NSString (firstChar) - (unichar)firstChar; @end @implementation NSString (reverse) - (unichar)firstChar { return [self characterAtIndex:0]; } @end
    • 123. Xcode Tour• Located in /Developer/Applications
    • 124. Code Editor
    • 125. Navigator
    • 126. Utilities
    • 127. Debug Area
    • 128. Run Controls
    • 129. Status Window (???)
    • 130. Window Configuration
    • 131. Run Controls Status Window (???) Window ConfigurationNavigator Code Editor Utilities Debug Area
    • 132. Hello World
    • 133. Model-View-Controller
    • 134. Model-View-ControllerModel
    • 135. Model-View-ControllerModel View
    • 136. Model-View-ControllerModel Controller View
    • 137. Model • Defines the data to be displayed in a view. • Model objects • DatabaseModel • Web
    • 138. Controller • Negotiates communication between the model and the view. • Controls presentation logic • Updates the modelController • Reflects those updates on the view
    • 139. View • Contains controls and UI Widgets • Informs the controller of updates.View
    • 140. Hello WorldModel Controller View (Hello_WorldViewController) (.xib) Label view
    • 141. Hello WorldModel Controller View (Hello_WorldViewController) (.xib) Label view
    • 142. Hello WorldModel Controller View (Hello_WorldViewController) (.xib) Label view
    • 143. Hello You
    • 144. Hello You• Basic string handling• Button control• TextField control• Outlets and Actions• Basic MVC
    • 145. Hello You Model Controller View (HelloYouViewController) (.xib)NSString: name view textField textField label label buttonTap: button
    • 146. Locations
    • 147. Locations• CoreLocation• UITableview• Delegate Pattern
    • 148. HTML Photo
    • 149. HTML App• Shows interaction between webview content and the native development kit.• Modal View Controllers• UIImagePickerController
    • 150. The HTML<html> <head> <meta name = "viewport" content = "width = device-width"> </head> <body> <h1>Tap for photo</h1> <input type="button" value="Get Photo" onClick="window.location=http://getphoto"/> <img width="320" height="200" id="image"/> </body></html>
    • 151. The JavaScriptvar image=document.getElementById(image);image.src = %@ • %@ will be replaced by the image url
    • 152. Loading the webviewNSError *error;NSString *filename = [[NSBundle mainBundle] pathForResource:@"webview" ofType:@"html"];NSString *html = [NSString stringWithContentsOfFile:filename encoding:NSUTF8StringEncoding error:&error];[webview loadHTMLString:html baseURL:nil];
    • 153. Intercepting the URL- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType{ if ([[[request URL] absoluteString] isEqualToString:@"http://getphoto/"]) { UIImagePickerController *picker = [[UIImagePickerController alloc] init]; picker.modalPresentationStyle = UIModalTransitionStyleCoverVertical; picker.delegate = self; [self presentModalViewController:picker animated:YES]; return NO; } return YES;}
    • 154. iOS Development• Web: pzearfoss@gmail.com http://zearfoss.wordpress.com @pzearfoss http://www.github.com/pzearfoss

    ×