November 2012
Beginner
480 pages
12h 18m
English
In Chapter 6, “Classes and Objects,” you learned the basics of defining classes and allocating, initializing, and copying object instances. But there is more to life than simple object creation. This chapter shows you how to add a method to an existing class even if you don’t have the source code for that class, how to hide the existence of methods and instance variables from (at least some) prying eyes, and how to limit access to an object’s instance variables. It also discusses Objective-C security (and the lack thereof).
Categories let you add additional methods to an existing class without subclassing it, and without requiring access to the class’s source code. Using a category to extend ...
Read now
Unlock full access