The Foundation framework provides support for a variety of basic functionalities and data types, including the following:
Strings, numbers, and collections
Dates and time
Means of working with files, including accessing data and working with bundles
Distributed event notification
Operating system interaction
This chapter discusses these subjects and provides several short examples that demonstrate of the most common methods of the key classes.
The Foundation framework provides many classes and protocols that extend the capabilities of the Objective-C language to represent and work with basic data types, such as strings and numbers, in an object-oriented fashion. Additionally, the Foundation framework provides application programming interfaces (APIs) for working with more complex data types, such as dates and collections.
Classes such as
classes; instances of these classes
cannot be altered after they are initialized. Each immutable class,
however, has a
NSString has the mutable subclass
has the subclass
subclasses extend their superclass’s functionality
to allow modification after initialization. Immutable classes are
more efficient, but mutable classes are more flexible.
Two of the most basic data types in an application are strings and numbers . The Foundation framework provides ...