Understanding Apple iOS MVC Architecture
This introduction to Apple mobile technologies explores iOS Model-View-Controller (MVC) architecture, highlighting the division of programs into logical units and emphasizing communication management between controllers, models, and views. Discover how controllers interact with models and views, and the structured communication process within MVC for efficient app development.
Download Presentation
Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
E N D
Presentation Transcript
Introduction to Apple mobile technologies- I393 IT College, Andres K ver, 2016-2017 Spring Web: http://enos.itcollege.ee/~akaver/apple Skype: akaver Email: akaver@itcollege.ee
iOS - MVC 2 CONTROLLER MODEL VIEW Program is divided into 3 logical units
iOS - MVC 3 CONTROLLER What your application is MODEL VIEW Program is divided into 3 logical units
iOS - MVC 4 How your Model is presented to the user (UI logic) CONTROLLER What your application is MODEL VIEW Program is divided into 3 logical units
iOS - MVC 5 How your Model is presented to the user (UI logic) CONTROLLER What your application is UI Components and layout MODEL VIEW Program is divided into 3 logical units
iOS - MVC 6 CONTROLLER MODEL VIEW Communication management is the key
iOS - MVC 7 CONTROLLER MODEL VIEW Controlles can communicate with their Model
iOS - MVC 8 CONTROLLER MODEL VIEW Controlles can communicate with their Model and View
iOS - MVC 9 CONTROLLER MODEL VIEW Model and View should never speak to each other!!!!
iOS - MVC 10 CONTROLLER MODEL VIEW Can View communicate vith Controller?
iOS - MVC 11 target CONTROLLER MODEL VIEW Communication is blind and structured. Controller can specify a target on itself and hand out an action to the View. View sends the action when events happen in UI
iOS - MVC 12 target CONTROLLER will should did MODEL VIEW Sometimes View needs to synchronize with the Controller. Will, should, did, . (willScroll, shouldScroll, didScroll)
iOS - MVC 13 will target should did CONTROLLER MODEL VIEW Controller sets itself as the View s delegate. Delegate is set via protocol.
iOS - MVC 14 will target should did CONTROLLER MODEL VIEW data at count Views do not own the data they display. If needed, they have a protocol to acquire it.
iOS - MVC 15 will target should did CONTROLLER data at count MODEL VIEW Controllers are almost always that data source (not Model).
iOS - MVC 16 will target should did CONTROLLER data at count MODEL VIEW Controllers interpret/format Model information for View.
iOS - MVC 17 will target should did CONTROLLER data at count MODEL VIEW Can the Model talk directly to the Controller? No, they are UI independent. But sometimes Model (network) needs to inform, that data has changed.
iOS - MVC 18 will target should did CONTROLLER data at count Notification & KVO MODEL VIEW Broadcast (messaging) mechanism is used for this. Interested parties can subscribe to these messages (Controllers and Models).