The name “View Controller” in iOS programming is a bit confusing as it includes both words “View” and “Controller” in the MVC model. Is “View Controller” actually just another name for Controller (as the view is actually mostly done by the Interface Builder). Why is it called a “View Controller”? Is it because this controller does all the view properties updating and event handling as well?
Share
Yes, a
UIViewControllerlives inside the “Controller” layer of MVC. But it is a special controller that controls and updates a view. View controllers can also handle events because they derive fromUIResponder.You can also create general controllers by subclassing
NSObject. For example an accounts controller that manages accounts etc. You actually find other controller classes in the iOS SDK, e.g.UIDocumentInteractionController.From the iOS View Controller Programming Guide: