10. More on Variables and Data Types
In this chapter, we'll go into more detail about variable scope, initialization methods for objects, and data types.
The initialization of an object needs some special attention, which we'll give it here.
We talked briefly about the scope of instance variables and also static and local variables in Chapter 7, “More on Classes.” We'll talk more about static variables here and introduce the concept of global and external ones as well. In addition, certain directives can be given to the Objective-C compiler to more precisely control the scope of your instance variables. These are covered in this chapter as well.
An enumerated data type enables you to define the name for a data type that will only be used to store ...
Get Programming in Objective-C 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.