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