question on MVC in objective c
in objective c, following MVC pattern we have: - VIEW = UIView subclass -开发者_如何学Go CONTROLLER = UIViewController subclass - MODEL = data for tableview ecc
instead generic classes that make operations and compute our data in which category can be inserted? MODEL? or what else?
The model classes are not just the data behind the table view, they are all the classes modeling the problem you want to solve.
Are you asking what classes can be used as model objects? There are quite a few... NS[Mutable]Dictionary, NS[Mutable]Array, NS[Mutable]Set, NS[Mutable]String, NSManagedObject, and so on. NSFetchedResultsController and NSManagedObjectContext both fit into a sort of model controller role. Often, though, a significant portion of your application's functionality is in the model, and it makes sense for the object that manages the data to be a class of your own creation.
精彩评论