0

While studying IOS, i generally come across viewcontroller. That gives me, confusion, if this "ViewController" has to do something with controller ( in MVC ) ? But how come both "view" and "controller" are combined in this terminology. What does it actually mean ?

asked Jan 11, 2014 at 8:02

1 Answer 1

3

ViewController is, as the name suggests, a single object that provides both a View and a Controller. Since mobile apps tend to have much tighter interaction models than desktop or web applications, there is usually a 1:1 coupling between views and controllers, and as such not as much of a reason to separate them out.

If you have a case for multiple views that share a single controller, you should still keep the controller separate, but otherwise it is okay to have single objects that provide both roles in MVC.

answered Jan 11, 2014 at 8:53

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.