SlideShare a Scribd company logo
1 of 22
Download to read offline
S W I F T G I R L S
A P P
Y U Y U
•
• MVC
• Tab bar Controller
• Navigation Controller
• Xcode
• Code
• : For loop GIF
• : Custom Segue
• Homework : Storyboard APP
A P P
• MVC
• (Model)
• (View)
• (Controller)
M V C
M V C
•
M V C
TA B B A R C O N T R O L L E R
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
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.
N AV I G AT I O N C O N T R O L L E R
H A N D ’ S O N
tab bar controller

embed in navigation controller
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
M O D A L
Page Sheet (only iPad)

, 

Form Sheet (only iPad)

, 

Full Screen 



Current Context
M O D A L
Cover Vertical 



Flip Horizontal 



Cross Dissolve



Partial Curl 
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")
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)
C O D E
popViewController self.navigationController?.popViewContro
ller(animated: true)
dismiss Self.Dismiss(Animated: True, Completion:
Nil)
F O R L O O P
tab bar item (relationship segue)
animationImages
item icon finder
C U S T O M S E G U E
• http://www.appcoda.com.tw/beginners-guide-animated-segue/
H O M E W O R K
• Storyboad APP
T H A N K Y O U !
• Today’s project
• https://github.com/qscez2001/swift-girls_4

More Related Content

Similar to Swift girls_新手第二期_4th_建構你的App架構

Formacion en movilidad: Conceptos de desarrollo en iOS (II)
Formacion en movilidad: Conceptos de desarrollo en iOS (II) Formacion en movilidad: Conceptos de desarrollo en iOS (II)
Formacion en movilidad: Conceptos de desarrollo en iOS (II) Mobivery
 
Session 13 - Working with navigation and tab bar
Session 13 - Working with navigation and tab barSession 13 - Working with navigation and tab bar
Session 13 - Working with navigation and tab barVu Tran Lam
 
Arc of developer part2
Arc of developer part2Arc of developer part2
Arc of developer part2Junpei Wada
 
아이폰강의(5) pdf
아이폰강의(5) pdf아이폰강의(5) pdf
아이폰강의(5) pdfsunwooindia
 
Migrating Objective-C to Swift
Migrating Objective-C to SwiftMigrating Objective-C to Swift
Migrating Objective-C to SwiftElmar Kretzer
 
iOS Development: What's New
iOS Development: What's NewiOS Development: What's New
iOS Development: What's NewNascentDigital
 
I pad uicatalog_lesson02
I pad uicatalog_lesson02I pad uicatalog_lesson02
I pad uicatalog_lesson02Rich Helton
 
Android Wear: A Developer's Perspective
Android Wear: A Developer's PerspectiveAndroid Wear: A Developer's Perspective
Android Wear: A Developer's PerspectiveVin Lim
 
An Event Apart Boston: Principles of Unobtrusive JavaScript
An Event Apart Boston: Principles of Unobtrusive JavaScriptAn Event Apart Boston: Principles of Unobtrusive JavaScript
An Event Apart Boston: Principles of Unobtrusive JavaScriptPeter-Paul Koch
 
Testing view controllers with Quick and Nimble
Testing view controllers with Quick and NimbleTesting view controllers with Quick and Nimble
Testing view controllers with Quick and NimbleMarcio Klepacz
 
Taking control of Storyboard
Taking control of StoryboardTaking control of Storyboard
Taking control of Storyboardpitiphong_p
 
Building your first iOS app using Xamarin
Building your first iOS app using XamarinBuilding your first iOS app using Xamarin
Building your first iOS app using XamarinGill Cleeren
 
iPhone Camp Birmingham (Bham) - Intro To iPhone Development
iPhone Camp Birmingham (Bham) - Intro To iPhone DevelopmentiPhone Camp Birmingham (Bham) - Intro To iPhone Development
iPhone Camp Birmingham (Bham) - Intro To iPhone Developmentandriajensen
 
storyboard時代のInterfaceBuilder
storyboard時代のInterfaceBuilderstoryboard時代のInterfaceBuilder
storyboard時代のInterfaceBuilderHiroyuki Fujikawa
 
用 IBDesignable 作 UI
用 IBDesignable 作 UI用 IBDesignable 作 UI
用 IBDesignable 作 UITsungyu Yu
 

Similar to Swift girls_新手第二期_4th_建構你的App架構 (20)

Mastering Interface Builder
Mastering Interface BuilderMastering Interface Builder
Mastering Interface Builder
 
Formacion en movilidad: Conceptos de desarrollo en iOS (II)
Formacion en movilidad: Conceptos de desarrollo en iOS (II) Formacion en movilidad: Conceptos de desarrollo en iOS (II)
Formacion en movilidad: Conceptos de desarrollo en iOS (II)
 
Session 13 - Working with navigation and tab bar
Session 13 - Working with navigation and tab barSession 13 - Working with navigation and tab bar
Session 13 - Working with navigation and tab bar
 
Arc of developer part2
Arc of developer part2Arc of developer part2
Arc of developer part2
 
아이폰강의(5) pdf
아이폰강의(5) pdf아이폰강의(5) pdf
아이폰강의(5) pdf
 
Migrating Objective-C to Swift
Migrating Objective-C to SwiftMigrating Objective-C to Swift
Migrating Objective-C to Swift
 
iOS Development: What's New
iOS Development: What's NewiOS Development: What's New
iOS Development: What's New
 
I pad uicatalog_lesson02
I pad uicatalog_lesson02I pad uicatalog_lesson02
I pad uicatalog_lesson02
 
Advanced iOS
Advanced iOSAdvanced iOS
Advanced iOS
 
IOS Storyboards
IOS StoryboardsIOS Storyboards
IOS Storyboards
 
Android Wear: A Developer's Perspective
Android Wear: A Developer's PerspectiveAndroid Wear: A Developer's Perspective
Android Wear: A Developer's Perspective
 
An Event Apart Boston: Principles of Unobtrusive JavaScript
An Event Apart Boston: Principles of Unobtrusive JavaScriptAn Event Apart Boston: Principles of Unobtrusive JavaScript
An Event Apart Boston: Principles of Unobtrusive JavaScript
 
Testing view controllers with Quick and Nimble
Testing view controllers with Quick and NimbleTesting view controllers with Quick and Nimble
Testing view controllers with Quick and Nimble
 
Taking control of Storyboard
Taking control of StoryboardTaking control of Storyboard
Taking control of Storyboard
 
Building your first iOS app using Xamarin
Building your first iOS app using XamarinBuilding your first iOS app using Xamarin
Building your first iOS app using Xamarin
 
iPhone Camp Birmingham (Bham) - Intro To iPhone Development
iPhone Camp Birmingham (Bham) - Intro To iPhone DevelopmentiPhone Camp Birmingham (Bham) - Intro To iPhone Development
iPhone Camp Birmingham (Bham) - Intro To iPhone Development
 
storyboard時代のInterfaceBuilder
storyboard時代のInterfaceBuilderstoryboard時代のInterfaceBuilder
storyboard時代のInterfaceBuilder
 
iOS
iOSiOS
iOS
 
iOS_Presentation
iOS_PresentationiOS_Presentation
iOS_Presentation
 
用 IBDesignable 作 UI
用 IBDesignable 作 UI用 IBDesignable 作 UI
用 IBDesignable 作 UI
 

Recently uploaded

COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...naitiksharma1124
 
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024MulesoftMunichMeetup
 
Evolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI EraEvolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI Eraconfluent
 
Weeding your micro service landscape.pdf
Weeding your micro service landscape.pdfWeeding your micro service landscape.pdf
Weeding your micro service landscape.pdftimtebeek1
 
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-CloudAlluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-CloudAlluxio, Inc.
 
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypseTomasz Kowalczewski
 
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...drm1699
 
The Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test AutomationThe Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test AutomationElement34
 
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale IbridaUNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale IbridaNeo4j
 
Jax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined DeckJax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined DeckMarc Lester
 
Community is Just as Important as Code by Andrea Goulet
Community is Just as Important as Code by Andrea GouletCommunity is Just as Important as Code by Andrea Goulet
Community is Just as Important as Code by Andrea GouletAndrea Goulet
 
The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)Roberto Bettazzoni
 
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit MilanWorkshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit MilanNeo4j
 
Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?Maxim Salnikov
 
BusinessGPT - Security and Governance for Generative AI
BusinessGPT  - Security and Governance for Generative AIBusinessGPT  - Security and Governance for Generative AI
BusinessGPT - Security and Governance for Generative AIAGATSoftware
 

Recently uploaded (20)

COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
 
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
 
Evolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI EraEvolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI Era
 
Weeding your micro service landscape.pdf
Weeding your micro service landscape.pdfWeeding your micro service landscape.pdf
Weeding your micro service landscape.pdf
 
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-CloudAlluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
 
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
 
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
 
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
 
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
 
The Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test AutomationThe Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test Automation
 
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale IbridaUNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
 
Abortion Pill Prices Turfloop ](+27832195400*)[ 🏥 Women's Abortion Clinic in ...
Abortion Pill Prices Turfloop ](+27832195400*)[ 🏥 Women's Abortion Clinic in ...Abortion Pill Prices Turfloop ](+27832195400*)[ 🏥 Women's Abortion Clinic in ...
Abortion Pill Prices Turfloop ](+27832195400*)[ 🏥 Women's Abortion Clinic in ...
 
Jax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined DeckJax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined Deck
 
Community is Just as Important as Code by Andrea Goulet
Community is Just as Important as Code by Andrea GouletCommunity is Just as Important as Code by Andrea Goulet
Community is Just as Important as Code by Andrea Goulet
 
The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)
 
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
 
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit MilanWorkshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
 
Abortion Clinic In Springs ](+27832195400*)[ 🏥 Safe Abortion Pills in Springs...
Abortion Clinic In Springs ](+27832195400*)[ 🏥 Safe Abortion Pills in Springs...Abortion Clinic In Springs ](+27832195400*)[ 🏥 Safe Abortion Pills in Springs...
Abortion Clinic In Springs ](+27832195400*)[ 🏥 Safe Abortion Pills in Springs...
 
Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?
 
BusinessGPT - Security and Governance for Generative AI
BusinessGPT  - Security and Governance for Generative AIBusinessGPT  - Security and Governance for Generative AI
BusinessGPT - Security and Governance for Generative AI
 

Swift girls_新手第二期_4th_建構你的App架構

  • 1. S W I F T G I R L S A P P
  • 2. Y U Y U
  • 3. • • MVC • Tab bar Controller • Navigation Controller • Xcode • Code • : For loop GIF • : Custom Segue • Homework : Storyboard APP
  • 5. • MVC • (Model) • (View) • (Controller) M V C
  • 8. TA B B A R C O N T R O L L E R
  • 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.
  • 11. N AV I G AT I O N C O N T R O L L E R
  • 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/
  • 21. H O M E W O R K • Storyboad APP
  • 22. T H A N K Y O U ! • Today’s project • https://github.com/qscez2001/swift-girls_4