SlideShare a Scribd company logo
04/16 Stefan Erdmann 1
Cocoa Touch | Model-View-Controller
Controller
Model View
04/16 Stefan Erdmann 2
Cocoa Touch | Model-View-Controller
Controller
Model View
View notifies controller when
things happen in the UI
View asks controller for data
04/16 Stefan Erdmann 3
Cocoa Touch | Model-View-Controller
Controller interpret/format
model information for the view
Controller
Model View
Controller updates model
View notifies controller when
things happen in the UI
View asks controller for data
04/16 Stefan Erdmann 4
Cocoa Touch | Model-View-Controller
Controller interpret/format
model information for the view
Controller
Model View
Controller updates model
View notifies controller when
things happen in the UI
View asks controller for data
Model informs controllers
about changes
04/16 Stefan Erdmann 5
Cocoa Touch | Model-View-Controller
Controller interpret/format
model information for the view
Controller
Model View
Controller updates view
Controller updates model
View notifies controller when
things happen in the UI
View asks controller for data
Model informs controllers
about changes
04/16 Stefan Erdmann 6
Cocoa Touch | Model-View-Controller
Controller interpret/format
model information for the view
Controller
Model View!
No direct communication
Controller updates view
Controller updates model
View notifies controller when
things happen in the UI
View asks controller for data
Model informs controllers
about changes
04/16 Stefan Erdmann 7
Cocoa Touch | MVC iOS Specific
Controller
Model View
04/16 Stefan Erdmann 8
Cocoa Touch | MVC iOS Specific
Controller
Model View!
No direct communication
04/16 Stefan Erdmann 9
Cocoa Touch | MVC iOS Specific
Controller
Model View!
No direct communication
View elements can be connected
to the controller via outlets
04/16 Stefan Erdmann 10
Cocoa Touch | MVC iOS Specific
Controller
Model View!
No direct communication
Controller can register a target and
the view sends actions
(can also reach controller via responder chain)
04/16 Stefan Erdmann 11
Cocoa Touch | MVC iOS Specific
Controller
Model View!
No direct communication
delegate
View informs controller about state changes
(table-view informs about which rows are selected)
04/16 Stefan Erdmann 12
Cocoa Touch | MVC iOS Specific
Controller
Model View!
No direct communication
delegate
datasource
View elements define protocols which
controllers have to conform to in
order to provide data for the view
(see table view data source delegate)
04/16 Stefan Erdmann 13
Cocoa Touch | MVC iOS Specific
Controller
Model View!
No direct communication
delegate
datasource
Controller has a direct reference to the model
04/16 Stefan Erdmann 14
Cocoa Touch | MVC iOS Specific
Controller
Model View!
No direct communication
delegate
datasource
Model can inform the controller about data
modifications via a delegate (see FetchedResultController)
04/16 Stefan Erdmann 15
Cocoa Touch | MVC iOS Specific
Controller
Model View!
No direct communication
delegate
datasource
Notifications
Controller can register with a notification center
in order to receive messages from the model
04/16 Stefan Erdmann 16
Cocoa Touch | MVC iOS Specific
Controller
Model View!
No direct communication
delegate
datasource
Notifications
KVO Controller can observe properties of the
model and is automatically
informed about data modifications
(Key-Value-Observing)

More Related Content

Similar to MVC in iOS apps

Murach: An introduction to web programming with ASP.NET Core MVC
Murach: An introduction to web programming with ASP.NET Core MVCMurach: An introduction to web programming with ASP.NET Core MVC
Murach: An introduction to web programming with ASP.NET Core MVC
MahmoudOHassouna
 
AD207 Presentation
AD207 PresentationAD207 Presentation
AD207 Presentation
mackejo1
 
L17 Presentation Layer Design
L17 Presentation Layer DesignL17 Presentation Layer Design
L17 Presentation Layer Design
Ólafur Andri Ragnarsson
 
How to Implement Modbus TCP Protocol using VBA with Excel
How to Implement Modbus TCP Protocol using VBA with ExcelHow to Implement Modbus TCP Protocol using VBA with Excel
How to Implement Modbus TCP Protocol using VBA with Excel
ACC Automation
 
Overview of CSharp MVC3 and EF4
Overview of CSharp MVC3 and EF4Overview of CSharp MVC3 and EF4
Overview of CSharp MVC3 and EF4
Rich Helton
 
Introduction to mvc architecture
Introduction to mvc architectureIntroduction to mvc architecture
Introduction to mvc architecture
ravindraquicsolv
 
Unit 07: Design Patterns and Frameworks (1/3)
Unit 07: Design Patterns and Frameworks (1/3)Unit 07: Design Patterns and Frameworks (1/3)
Unit 07: Design Patterns and Frameworks (1/3)
DSBW 2011/2002 - Carles Farré - Barcelona Tech
 
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...
SoftServe
 
MVVM+MEF in Silvelight - W 2010ebday
MVVM+MEF in Silvelight - W 2010ebdayMVVM+MEF in Silvelight - W 2010ebday
MVVM+MEF in Silvelight - W 2010ebday
Ricardo Fiel
 
MVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCMVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVC
Anton Krasnoshchok
 
SysInfoTools Exchange to Lotus Notes Converter
SysInfoTools Exchange to Lotus Notes ConverterSysInfoTools Exchange to Lotus Notes Converter
SysInfoTools Exchange to Lotus Notes Converter
SysInfoTools Software
 
Sprint Portlet MVC Seminar
Sprint Portlet MVC SeminarSprint Portlet MVC Seminar
Sprint Portlet MVC Seminar
John Lewis
 
Telerik Reporting– Quick Start (Part 1)
Telerik Reporting– Quick Start (Part 1)Telerik Reporting– Quick Start (Part 1)
Telerik Reporting– Quick Start (Part 1)
Guo Albert
 
MVC 4
MVC 4MVC 4
PnP reusable controls, property pane controls and PnPJS library
PnP reusable controls, property pane controls and PnPJS libraryPnP reusable controls, property pane controls and PnPJS library
PnP reusable controls, property pane controls and PnPJS library
Joel Rodrigues
 
ASP.NET MVC 4.0
ASP.NET MVC 4.0ASP.NET MVC 4.0
ASP.NET MVC 4.0
Senthamil Selvan
 
Test
TestTest
MVVM ( Model View ViewModel )
MVVM ( Model View ViewModel )MVVM ( Model View ViewModel )
MVVM ( Model View ViewModel )
Ahmed Emad
 
MSDN Unleashed: WPF Demystified
MSDN Unleashed: WPF DemystifiedMSDN Unleashed: WPF Demystified
MSDN Unleashed: WPF Demystified
Dave Bost
 
Oracle forms developer 10g vol1
Oracle forms developer 10g vol1Oracle forms developer 10g vol1
Oracle forms developer 10g vol1
abdull466
 

Similar to MVC in iOS apps (20)

Murach: An introduction to web programming with ASP.NET Core MVC
Murach: An introduction to web programming with ASP.NET Core MVCMurach: An introduction to web programming with ASP.NET Core MVC
Murach: An introduction to web programming with ASP.NET Core MVC
 
AD207 Presentation
AD207 PresentationAD207 Presentation
AD207 Presentation
 
L17 Presentation Layer Design
L17 Presentation Layer DesignL17 Presentation Layer Design
L17 Presentation Layer Design
 
How to Implement Modbus TCP Protocol using VBA with Excel
How to Implement Modbus TCP Protocol using VBA with ExcelHow to Implement Modbus TCP Protocol using VBA with Excel
How to Implement Modbus TCP Protocol using VBA with Excel
 
Overview of CSharp MVC3 and EF4
Overview of CSharp MVC3 and EF4Overview of CSharp MVC3 and EF4
Overview of CSharp MVC3 and EF4
 
Introduction to mvc architecture
Introduction to mvc architectureIntroduction to mvc architecture
Introduction to mvc architecture
 
Unit 07: Design Patterns and Frameworks (1/3)
Unit 07: Design Patterns and Frameworks (1/3)Unit 07: Design Patterns and Frameworks (1/3)
Unit 07: Design Patterns and Frameworks (1/3)
 
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...
 
MVVM+MEF in Silvelight - W 2010ebday
MVVM+MEF in Silvelight - W 2010ebdayMVVM+MEF in Silvelight - W 2010ebday
MVVM+MEF in Silvelight - W 2010ebday
 
MVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCMVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVC
 
SysInfoTools Exchange to Lotus Notes Converter
SysInfoTools Exchange to Lotus Notes ConverterSysInfoTools Exchange to Lotus Notes Converter
SysInfoTools Exchange to Lotus Notes Converter
 
Sprint Portlet MVC Seminar
Sprint Portlet MVC SeminarSprint Portlet MVC Seminar
Sprint Portlet MVC Seminar
 
Telerik Reporting– Quick Start (Part 1)
Telerik Reporting– Quick Start (Part 1)Telerik Reporting– Quick Start (Part 1)
Telerik Reporting– Quick Start (Part 1)
 
MVC 4
MVC 4MVC 4
MVC 4
 
PnP reusable controls, property pane controls and PnPJS library
PnP reusable controls, property pane controls and PnPJS libraryPnP reusable controls, property pane controls and PnPJS library
PnP reusable controls, property pane controls and PnPJS library
 
ASP.NET MVC 4.0
ASP.NET MVC 4.0ASP.NET MVC 4.0
ASP.NET MVC 4.0
 
Test
TestTest
Test
 
MVVM ( Model View ViewModel )
MVVM ( Model View ViewModel )MVVM ( Model View ViewModel )
MVVM ( Model View ViewModel )
 
MSDN Unleashed: WPF Demystified
MSDN Unleashed: WPF DemystifiedMSDN Unleashed: WPF Demystified
MSDN Unleashed: WPF Demystified
 
Oracle forms developer 10g vol1
Oracle forms developer 10g vol1Oracle forms developer 10g vol1
Oracle forms developer 10g vol1
 

Recently uploaded

AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSFAppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
Ajin Abraham
 
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
"Scaling RAG Applications to serve millions of users",  Kevin Goedecke"Scaling RAG Applications to serve millions of users",  Kevin Goedecke
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
Fwdays
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
Javier Junquera
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
saastr
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
DianaGray10
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
ScyllaDB
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
Safe Software
 
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin..."$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
Fwdays
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
Alex Pruden
 
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance PanelsNorthern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving
 
A Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's ArchitectureA Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's Architecture
ScyllaDB
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Pitangent Analytics & Technology Solutions Pvt. Ltd
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
Miro Wengner
 
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptxPRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
christinelarrosa
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
AstuteBusiness
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
Neo4j
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
Jason Yip
 

Recently uploaded (20)

AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSFAppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
 
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
"Scaling RAG Applications to serve millions of users",  Kevin Goedecke"Scaling RAG Applications to serve millions of users",  Kevin Goedecke
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
 
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin..."$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
 
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance PanelsNorthern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
 
A Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's ArchitectureA Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's Architecture
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
 
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptxPRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
 

MVC in iOS apps

  • 1. 04/16 Stefan Erdmann 1 Cocoa Touch | Model-View-Controller Controller Model View
  • 2. 04/16 Stefan Erdmann 2 Cocoa Touch | Model-View-Controller Controller Model View View notifies controller when things happen in the UI View asks controller for data
  • 3. 04/16 Stefan Erdmann 3 Cocoa Touch | Model-View-Controller Controller interpret/format model information for the view Controller Model View Controller updates model View notifies controller when things happen in the UI View asks controller for data
  • 4. 04/16 Stefan Erdmann 4 Cocoa Touch | Model-View-Controller Controller interpret/format model information for the view Controller Model View Controller updates model View notifies controller when things happen in the UI View asks controller for data Model informs controllers about changes
  • 5. 04/16 Stefan Erdmann 5 Cocoa Touch | Model-View-Controller Controller interpret/format model information for the view Controller Model View Controller updates view Controller updates model View notifies controller when things happen in the UI View asks controller for data Model informs controllers about changes
  • 6. 04/16 Stefan Erdmann 6 Cocoa Touch | Model-View-Controller Controller interpret/format model information for the view Controller Model View! No direct communication Controller updates view Controller updates model View notifies controller when things happen in the UI View asks controller for data Model informs controllers about changes
  • 7. 04/16 Stefan Erdmann 7 Cocoa Touch | MVC iOS Specific Controller Model View
  • 8. 04/16 Stefan Erdmann 8 Cocoa Touch | MVC iOS Specific Controller Model View! No direct communication
  • 9. 04/16 Stefan Erdmann 9 Cocoa Touch | MVC iOS Specific Controller Model View! No direct communication View elements can be connected to the controller via outlets
  • 10. 04/16 Stefan Erdmann 10 Cocoa Touch | MVC iOS Specific Controller Model View! No direct communication Controller can register a target and the view sends actions (can also reach controller via responder chain)
  • 11. 04/16 Stefan Erdmann 11 Cocoa Touch | MVC iOS Specific Controller Model View! No direct communication delegate View informs controller about state changes (table-view informs about which rows are selected)
  • 12. 04/16 Stefan Erdmann 12 Cocoa Touch | MVC iOS Specific Controller Model View! No direct communication delegate datasource View elements define protocols which controllers have to conform to in order to provide data for the view (see table view data source delegate)
  • 13. 04/16 Stefan Erdmann 13 Cocoa Touch | MVC iOS Specific Controller Model View! No direct communication delegate datasource Controller has a direct reference to the model
  • 14. 04/16 Stefan Erdmann 14 Cocoa Touch | MVC iOS Specific Controller Model View! No direct communication delegate datasource Model can inform the controller about data modifications via a delegate (see FetchedResultController)
  • 15. 04/16 Stefan Erdmann 15 Cocoa Touch | MVC iOS Specific Controller Model View! No direct communication delegate datasource Notifications Controller can register with a notification center in order to receive messages from the model
  • 16. 04/16 Stefan Erdmann 16 Cocoa Touch | MVC iOS Specific Controller Model View! No direct communication delegate datasource Notifications KVO Controller can observe properties of the model and is automatically informed about data modifications (Key-Value-Observing)

Editor's Notes

  1. Controller: beinhaltet die Logik zur View Formatiert Daten für die View Validiert Daten auf der View Model: beinhaltet die Business Logik zu den Daten
  2. Controller: beinhaltet die Logik zur View Formatiert Daten für die View Validiert Daten auf der View Model: beinhaltet die Business Logik zu den Daten
  3. Controller: beinhaltet die Logik zur View Formatiert Daten für die View Validiert Daten auf der View Model: beinhaltet die Business Logik zu den Daten
  4. Controller: beinhaltet die Logik zur View Formatiert Daten für die View Validiert Daten auf der View Model: beinhaltet die Business Logik zu den Daten
  5. Controller: beinhaltet die Logik zur View Formatiert Daten für die View Validiert Daten auf der View Model: beinhaltet die Business Logik zu den Daten
  6. Controller: beinhaltet die Logik zur View Formatiert Daten für die View Validiert Daten auf der View Model: beinhaltet die Business Logik zu den Daten
  7. View Target Action: controller registers as target – View sends action (could also reach the controller via the responder chain) Delegate: View informs controller about state changes, tableview informs controller about rows which are selected... Data source: View defines protocol of methods which view uses to get information about the data in a specific format (see tableview data source delegate) Controller Outlet Direct reference Model Notifications werden gesendet – Controller können sich für bestimmte Nachrichtenpools registrieren KVO – Key Value Observing – Controller kann sich für Änderungen an Properties registrieren (you can use key-value observing with a Swift class, as long as the class inherits from the NSObject class) Delegate – FetchedResultController informiert Controller wenn Daten sich ändern
  8. View Target Action: controller registers as target – View sends action (could also reach the controller via the responder chain) Delegate: View informs controller about state changes, tableview informs controller about rows which are selected... Data source: View defines protocol of methods which view uses to get information about the data in a specific format (see tableview data source delegate) Controller Outlet Direct reference Model Notifications werden gesendet – Controller können sich für bestimmte Nachrichtenpools registrieren KVO – Key Value Observing – Controller kann sich für Änderungen an Properties registrieren (you can use key-value observing with a Swift class, as long as the class inherits from the NSObject class) Delegate – FetchedResultController informiert Controller wenn Daten sich ändern
  9. View Target Action: controller registers as target – View sends action (could also reach the controller via the responder chain) Delegate: View informs controller about state changes, tableview informs controller about rows which are selected... Data source: View defines protocol of methods which view uses to get information about the data in a specific format (see tableview data source delegate) Controller Outlet Direct reference Model Notifications werden gesendet – Controller können sich für bestimmte Nachrichtenpools registrieren KVO – Key Value Observing – Controller kann sich für Änderungen an Properties registrieren (you can use key-value observing with a Swift class, as long as the class inherits from the NSObject class) Delegate – FetchedResultController informiert Controller wenn Daten sich ändern
  10. View Target Action: controller registers as target – View sends action (could also reach the controller via the responder chain) Delegate: View informs controller about state changes, tableview informs controller about rows which are selected... Data source: View defines protocol of methods which view uses to get information about the data in a specific format (see tableview data source delegate) Controller Outlet Direct reference Model Notifications werden gesendet – Controller können sich für bestimmte Nachrichtenpools registrieren KVO – Key Value Observing – Controller kann sich für Änderungen an Properties registrieren (you can use key-value observing with a Swift class, as long as the class inherits from the NSObject class) Delegate – FetchedResultController informiert Controller wenn Daten sich ändern
  11. View Target Action: controller registers as target – View sends action (could also reach the controller via the responder chain) Delegate: View informs controller about state changes, tableview informs controller about rows which are selected... Data source: View defines protocol of methods which view uses to get information about the data in a specific format (see tableview data source delegate) Controller Outlet Direct reference Model Notifications werden gesendet – Controller können sich für bestimmte Nachrichtenpools registrieren KVO – Key Value Observing – Controller kann sich für Änderungen an Properties registrieren (you can use key-value observing with a Swift class, as long as the class inherits from the NSObject class) Delegate – FetchedResultController informiert Controller wenn Daten sich ändern
  12. View Target Action: controller registers as target – View sends action (could also reach the controller via the responder chain) Delegate: View informs controller about state changes, tableview informs controller about rows which are selected... Data source: View defines protocol of methods which view uses to get information about the data in a specific format (see tableview data source delegate) Controller Outlet Direct reference Model Notifications werden gesendet – Controller können sich für bestimmte Nachrichtenpools registrieren KVO – Key Value Observing – Controller kann sich für Änderungen an Properties registrieren (you can use key-value observing with a Swift class, as long as the class inherits from the NSObject class) Delegate – FetchedResultController informiert Controller wenn Daten sich ändern
  13. View Target Action: controller registers as target – View sends action (could also reach the controller via the responder chain) Delegate: View informs controller about state changes, tableview informs controller about rows which are selected... Data source: View defines protocol of methods which view uses to get information about the data in a specific format (see tableview data source delegate) Controller Outlet Direct reference Model Notifications werden gesendet – Controller können sich für bestimmte Nachrichtenpools registrieren KVO – Key Value Observing – Controller kann sich für Änderungen an Properties registrieren (you can use key-value observing with a Swift class, as long as the class inherits from the NSObject class) Delegate – FetchedResultController informiert Controller wenn Daten sich ändern
  14. View Target Action: controller registers as target – View sends action (could also reach the controller via the responder chain) Delegate: View informs controller about state changes, tableview informs controller about rows which are selected... Data source: View defines protocol of methods which view uses to get information about the data in a specific format (see tableview data source delegate) Controller Outlet Direct reference Model Notifications werden gesendet – Controller können sich für bestimmte Nachrichtenpools registrieren KVO – Key Value Observing – Controller kann sich für Änderungen an Properties registrieren (you can use key-value observing with a Swift class, as long as the class inherits from the NSObject class) Delegate – FetchedResultController informiert Controller wenn Daten sich ändern
  15. View Target Action: controller registers as target – View sends action (could also reach the controller via the responder chain) Delegate: View informs controller about state changes, tableview informs controller about rows which are selected... Data source: View defines protocol of methods which view uses to get information about the data in a specific format (see tableview data source delegate) Controller Outlet Direct reference Model Notifications werden gesendet – Controller können sich für bestimmte Nachrichtenpools registrieren KVO – Key Value Observing – Controller kann sich für Änderungen an Properties registrieren (you can use key-value observing with a Swift class, as long as the class inherits from the NSObject class) Delegate – FetchedResultController informiert Controller wenn Daten sich ändern
  16. View Target Action: controller registers as target – View sends action (could also reach the controller via the responder chain) Delegate: View informs controller about state changes, tableview informs controller about rows which are selected... Data source: View defines protocol of methods which view uses to get information about the data in a specific format (see tableview data source delegate) Controller Outlet Direct reference Model Notifications werden gesendet – Controller können sich für bestimmte Nachrichtenpools registrieren KVO – Key Value Observing – Controller kann sich für Änderungen an Properties registrieren (you can use key-value observing with a Swift class, as long as the class inherits from the NSObject class) Delegate – FetchedResultController informiert Controller wenn Daten sich ändern