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
Foundation framework provides object abstractions in the form of
NSNumber, and an
extensive API to manipulate them.
Foundation’s primary class used to represent and
manipulate strings is
NSString. Instances of
can be considered, at their core, an
immutable array of Unicode characters, and can represent characters
from the alphabets of nearly every written language, past and
present. In fact,
NSString is a class cluster, which shields the developer from a number of underlying ...