Understanding Apple iOS MVC Architecture

Slide Note
Embed
Share

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.


Uploaded on Sep 11, 2024 | 0 Views


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


  1. 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

  2. iOS - MVC 2 CONTROLLER MODEL VIEW Program is divided into 3 logical units

  3. iOS - MVC 3 CONTROLLER What your application is MODEL VIEW Program is divided into 3 logical units

  4. 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

  5. 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

  6. iOS - MVC 6 CONTROLLER MODEL VIEW Communication management is the key

  7. iOS - MVC 7 CONTROLLER MODEL VIEW Controlles can communicate with their Model

  8. iOS - MVC 8 CONTROLLER MODEL VIEW Controlles can communicate with their Model and View

  9. iOS - MVC 9 CONTROLLER MODEL VIEW Model and View should never speak to each other!!!!

  10. iOS - MVC 10 CONTROLLER MODEL VIEW Can View communicate vith Controller?

  11. 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

  12. iOS - MVC 12 target CONTROLLER will should did MODEL VIEW Sometimes View needs to synchronize with the Controller. Will, should, did, . (willScroll, shouldScroll, didScroll)

  13. iOS - MVC 13 will target should did CONTROLLER MODEL VIEW Controller sets itself as the View s delegate. Delegate is set via protocol.

  14. 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.

  15. iOS - MVC 15 will target should did CONTROLLER data at count MODEL VIEW Controllers are almost always that data source (not Model).

  16. iOS - MVC 16 will target should did CONTROLLER data at count MODEL VIEW Controllers interpret/format Model information for View.

  17. 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.

  18. 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).

Related


More Related Content