IPhone development and use of separate model files?

I read a lot about MVC as I step up the development of iPhone / IOS. However, in the different example files that I still see, I don’t see separate classes for the model, view and controller?

How should I specifically see MVC in action with iPhone best practices? For example, perhaps one is based on the NavigationController and some table views, etc.

For instance:

  • Should there be a separate model, view and controller for each "iPhone UI controller" - noting that it seems that the iPhone develops 1 page == 1 UI controller, from which I can see, then my question is whether each user interface has its own file View and Model?

  • Given that Interface Builder and NIB are most of the things, how much is NIB considered to be part of the MVC pattern? for example, does NIB create an effective “controller” and “view”, leaving you to create a separate class (in a separate file) for the model?

  • What happens when you have common data (or a common model - for example, a list of elements) that are used / used by several pages of applications (for example, viewing a list, viewing, etc.) - in this case it seems to me that you there will be a 1 x model, but then reuse an instance of that model on separate pages (which are View and Controller).

Hope this makes sense ...

+3
source share
1 answer

MVC, . UIView (). UIViewController UIView (Controller). , , UIViewController, (). , , , . , , / , .

- ( ) .

+2

Source: https://habr.com/ru/post/1793780/


All Articles