This document discusses iOS app development concepts including the model-view-controller (MVC) pattern, tab bar controllers, navigation controllers, segues, and modal presentations. It provides code examples for setting up storyboards, view controllers, and transitions between view controllers using push, present modally, and custom segues. Homework involves creating a storyboard app to demonstrate these concepts.
9. TA B B A R C O N T R O L L E R
The tab bar controller
1. creates and manages
the tab bar view
2. manages the view
controllers that provide
the content view for
each mode
10. N AV I G AT I O N C O N T R O L L E R
A navigation controller
1. manage the
presentation of your
content view controllers
2. presents a navigation
bar.
12. H A N D ’ S O N
tab bar controller
embed in navigation controller
13. X C O D E
Show e.g. Push
Navigation Controller
Show Detail e.g. Replace
Present Modally
Pesent As Popover
pop (only iPad)
*4
14. M O D A L
Page Sheet (only iPad)
,
Form Sheet (only iPad)
,
Full Screen
Current Context
15. M O D A L
Cover Vertical
Flip Horizontal
Cross Dissolve
Partial Curl
16. C O D E
storyboardID
//
var vc1:UIViewController!
var vc2:UIViewController!
var vc3:UIViewController!
// Storyboard
var storyboardA = UIStoryboard(name: "Main", bundle: nil)
// Storyboard ID
vc1 = storyboardA.instantiateViewController(withIdentifier:
"rootvc")
vc2 = storyboardA.instantiateViewController(withIdentifier:
"pushvc")
vc3 = storyboardA.instantiateViewController(withIdentifier:
"presentvc")
17. C O D E
root UIApplication.shared.keyWindow?.rootView
Controller = vc1
push(e.g. show) Self.Navigationcontroller?.Pushviewcontr
oller(Vc2, Animated: False)
present(e.g modal)
vc.modalTransitionStyle =
UIModalTransitionStyle.crossDissolve
vc.modalPresentationStyle =
UIModalPresentationStyle.formSheet
self.present(vc3, animated:true)
18. C O D E
popViewController self.navigationController?.popViewContro
ller(animated: true)
dismiss Self.Dismiss(Animated: True, Completion:
Nil)
19. F O R L O O P
tab bar item (relationship segue)
animationImages
item icon finder
20. C U S T O M S E G U E
• http://www.appcoda.com.tw/beginners-guide-animated-segue/