I'm new to Objective-C and not a full-time programmer. To differentiate the UI from the model, -Looking control design patterns The user performs an action and sends a message to the visual controller representative (model). But I'm not sure what is the best way to send an action to the controller to see the delegates back.
For example, the user presses a button, the VC message is representative. After the part I understand, the representative takes action, and after that, he wants to update the representative VC (e.g., update a label).
So what I left (or forgot) is how it is done, while maintaining a separation between the UI and the model. I think I can use the Notification Center or I think that I can only pass the callback to the view controller to the delegate. Or maybe one other option I do not know. Please give me some suggestions, please?
I think that you think MVC paradigm is a little wrong, models never represent ideas Because the model should not have any dependency or any visual class knowledge. Typically, a view sends messages to your representative or goal (if you are using target / verb), which is usually a controller (often on the UIViewController on iOS) controller Access data from the model and can update any view that needs to be updated. I recommend reading for a more complete description.
Comments
Post a Comment