View
644
Download
0
Category
Tags:
Preview:
DESCRIPTION
A slide I presented yesterday on Offline Class of Jasakom - one of a biggest hacker community in Indonesia. This slide is quite similar with my previous slides of the same topic, but with more and updated content.
Citation preview
Andri YadiPresident, ID-ObjC | CEO, DyCode
@andri_yadi | a (at) dycode (dot) comhttp://andriyadi.me
Introduction to iOS DevelopmentO!ine Class Jasakomer (Special iOS), April 15, 2012
about me
The !rst & largest iOS & OSX developer community in Indonesia
ID-ObjectiveCPresident
4 years in a row
2011 - now
start a company & code for food9 years in mobile development
a movie freak
iOS Devices
21
Start developing iOS apps Today!
http://developer.apple.com/ios
Xcode iOS Simulator iOS Developer Library
Required Stu!s
Latest iOS SDK
27
Installing Tools
Optional Stu!s
Actual iOS devices
For debugging to device & deployment to AppStore
Some development stuffs
Objective-CC + OOP " C++
A superset of C:• Syntactical convention for de#ning
classes & method• Syntax for method invocation• Syntax for declaring & synthesizing
properties• Static & dynamic typing• Blocks• Extension: protocol & categories
Objective-C Advantages:• Dynamic typing:
enables to determine the class of an object at runtime
• Dynamic binding:allows to determine the method to call at runtime instead of at compile-time
• Dynamic loading:allows to add modules of code & other resources at runtime.
Classes & Objects
Methods & Messaging
[aMutableArray insertObject:anObject atIndex:0];
[[self aMutableArray] insertObject:anObject atIndex:0];
[self.aMutableArray insertObject:anObject atIndex:0];
Blocks
int result = myBlock(4);
Protocols & Categories
@interface NowPlayingController : UIViewController<UIScrollViewDelegate, ProfileViewDelegate> { }@end
Protocol == Interface in other OOP language (Java, C#)
@protocol ProfileViewDelegate- (void)profileView:(ProfileView *)profileView doSignInWith:(AuthProviderType)signInType sender:(id)sender;
@optional- (void)profileView:(ProfileView *)profileView doSignOut:(id)sender;@end
Category, enables to extend a class without subclassing it@interface NSDate (Additions)+ (NSDate *)dateFromTimeString:(NSString*)timeString;+ (NSDate *)dateWithJSONString:(NSString *)json;
- (NSDate *)dateByAddingDays:(NSInteger)numDays;- (NSDate *)dateByAddingHours:(NSInteger)numHours;@end
Design Pattern
Model-View-Controller design pattern
Model-View-Controller design pattern
NowPlayingController
NowPlayingView
NowPlaying
Reference countingNo garbage collector support (yet)
Autorelease Pool
Memory Management
iOS frameworks
Enable apps to store user documents and key value data
Storage
Push changes to all user’s computers and devices
Easily integrate Tweet Sheet
Access system-wide Twitter account from within app
Wrap OAuth request & response
Memory management becomes compiler’s job
Manually enabled in XcodeIt’s NOT a garbage collector!
Automatic ReferenceCounting (ARC)
No need to deal with retain & release by yourself
Layout the app’s work!ow & design user interfaces
Can be loaded dynamically
Storyboard
Specify transitions & segues between views
Image processing framework "nally comes to iOS
Advanced features: red-eye reduction, face recognition
CoreImage
Provides built-in "lters: color e#ect, distortions, transitions
Take advantage of the latest hardware
Apple-developed OpenGL ES extensions
GLKit: new high-level framework
Cocoa TouchFoundation, UIKit, Multi-Touch Gestures
GraphicsCore Graphics, Core Animation, Core Image, Core Text, OpenGL ES
CoreDataDatabase, Object-Relational Mapping, optimized for mobile - > 1 million objects store
Audio & VideoMedia player, Core Audio & OpenAL, iPod library, HTTP Live Streaming
NetworkingBonjour, Peer to peer, WebKit framework, BSD socket
Core Location & MapKit
MultitaskingNew kind of multitasking
External display support
AirPrintWireless printing to AirPrint-enabled printers. Hack available
Push & Local Notification
Game CenterSocial gaming platform
iAdIntegrated advertising platform
In-App PurchasePayment inside applications
Human Interface Design
GUI Elementshttp://www.teehanlax.com/downloads/iOS_5_GUI_iPhone4S.psd.zip
Storyboard
The app will look like these
App Store Submission
Finally, on the App Store
you app can use this badge!
Everything is here: http://developer.apple.com/ios
https://developer.apple.com/library/ios/#referencelibrary/GettingStarted/RoadMapiOS/Introduction/Introduction.html
Let’s see some code
DYCODE IS HIRING!
If you think you’re awesome, either mobile developer guru or still early learner, send your awesome CV to: hrd@dycode.com
Recommended