Hour 10. Using View Controllers
Hour 2, “Handling Interaction,” introduced the Model View Controller architecture, and Hour 5, “Adding Variables to the Calculator,” reinforced the distinction between a controller and a model. So far, we’ve defined all the methods of our controllers, and our controllers have been derived from NSObject
. Because controllers often implement the same methods in complex applications, Cocoa Touch provides standard view controller classes. By subclassing from these view controller classes, your controller can inherit their methods, reducing the amount of code you must write.
This hour’s Calculator example ...
Get Sams Teach Yourself Cocoa Touch™ Programming in 24 Hours now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.