Reputation: 103
This may be kind of a new noob question, but what are view controllers in Objective-C? How is a UIView different from a UIViewController? Thanks very much!!
Upvotes: 1
Views: 324
Reputation: 514
There is a design pattern called MVC (Mode, View, Controller) It is the idea that every class you make needs to fit neatly in one and only one of these categories.
Model objects hold data.
View objects are visible to the user, and accept input from the user. (input being a button press, or sliding a finger across the screen)
A Controller is in charge of orchestrating the conversation between the Model and the View.
To be honest, this is a fairly basic concept. If its something with which you are unfamiliar i would recommend checking out some other resources. You will be much happier with your programming experience if you have a solid understanding of these basic principals.
http://www.bignerdranch.com/book/ios_programming_the_big_nerd_ranch_guide_rd_edition_ is an excellent book.
Upvotes: 3
Reputation: 4946
A view controller a kind of middle man between what is displayed and the data model backing your application.
Upvotes: 0