CO NÁS ČEKÁ?• Motivace
• Jak se stát iOS Developerem?
• Vývoj pro iOS a jeho specifika
• Architektura aplikace
• Obrazovky a UI
• Best practices
• Čtení na doma
IOS VS ANDROID• nízká fragmentace
• rychlá adopce nových verzí iOS
• optimalizovaný HW
• vyšší produktivita
• vyšší požadavky uživatelů
• “performance nazis”
ZAČÍNÁME
• účet na https://developer.apple.com/
• xCode
• mac/vm/hackintosh (http://www.tonymacx86.com)
• (ios zařízení)
REFERENCE DO ZAČÁTKU
• Developer docs: https://developer.apple.com/library/ios/navigation/
• RoadMapiOS: https://developer.apple.com/library/ios/referencelibrary/GettingStarted/RoadMapiOS/
• tutoriály na http://www.raywenderlich.com
ARCHITEKTURACocoa Touch
Media
Core Services
Core OS
CoreData, CoreLocation, CoreMotion, Foundation,
CFNetwork, NewsstandKit, Webkit, QuickLook…
ARCHITEKTURACocoa Touch
Media
Core Services
Core OS
AVFoundation, CoreAudio, CoreImage, CoreText, GLKit,
MediaPLayer, Photos, QuartzCore, SpriteKit,…
ARCHITEKTURACocoa Touch
Media
Core Services
Core OS
UIKit, EventKit, MapKit, NotificationCenter, Social, …
PODTŘÍDY UIVIEWUIControl UIButton
UIPicker
UISlider
UISwitch
UITextfield
UIScrollView UITableView
UITextView
UICollectionView
UIImageView
UILabel
UIStepper
UIWebView
MKMapView
UIProgressView
UIActivityView
UIView
UIVIEW FRAME
• struktura CGRect
• origin & size
• relativně k superview
• neplést s Bounds!
• attr BOOL clipsToBounds
view
subview 1
subview2
UIVIEW• BackgroundColor
• Atributy Hidden vs Alpha
• Touch events vs Gesture recognizers
• Motion events
• Animace (pozice, transformace, pozadí, alpha)
• CALayer
VIEW LIFECYCLE
LoadView
ViewDidLoad ViewWillAppear
ViewDidAppear
ViewWillDisappear
ViewDidDisappear
požadavek na zobrazení View
požadavek na skrytí View
DidReceiveMemoryWarning
REAKCE NA UDÁLOSTI• Target-Action
• Delegace
• Zprávy přes NSNotificationCenter
• Key-value observing
• (callback blocks)
TARGET-ACTION
UIControl
Target: myViewControllerAction: buttonPressed:
myViewController
UIControlEventTouchUpInside
- (void) buttonPressed:(id)sender
DELEGACE
aObject
delegate: myViewController
myViewController
- - aObject:DidSomething:- - aObject:ShouldDoSomething:
aObject:ShouldDoSomething:
YES
aObject:DidSomething:
NSNOTIFICATIONCENTER
NSNotificationCenter
anyObject otherObject
addObserver postNotification
observer1 observer2 observer3
TABULKY
UITableView
UITableViewCell
UITableViewCell
UITableViewDataSource
2numberOfSectionsInTableView:
tableView:numberOfRowsInSection:5
tableView:cellForRowAtIndexPath:UITableViewCell
TABULKY
UITableView
UITableViewCell
UITableViewCell
UITableViewDelegate
60tableView:heightForRowAtIndexPath:
tableView:viewForHeaderInSection:UIView
tableView:didSelectRowAtIndexPath:
DISTRIBUCE APLIKACE
• BundleId
• Vývojářský certifikát
• Provision profile
• AdHoc vs AppStore
• Testflight
ODKAZY
• Architektura iOS: https://developer.apple.com/library/ios/documentation/Miscellaneous/Conceptual/iPhoneOSTechOverview/Introduction/Introduction.html#//apple_ref/doc/uid/TP40007898-CH1-SW1
• HIG: https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/
• Videa z WWDC: https://developer.apple.com/videos/wwdc/2014/