Numbers, Data, and Basic Values

Work with primitive values and other fundamental types used throughout Cocoa.

Topics

Numbers

NSInteger

Describes an integer.

NSUInteger

Describes an unsigned integer.

NSDecimal

A structure representing a base-10 number.

NSDecimalNumber

An object for representing and performing arithmetic on base-10 numbers.

NSNumber

An object wrapper for primitive scalar numeric values.

NSNumberFormatter

A formatter that converts between numeric values and their textual representations.

Binary Data

NSData

A static byte buffer in memory.

NSMutableData

An object representing a dynamic byte buffer in memory.

URLs

NSURL

An object that represents the location of a resource, such as an item on a remote server or the path to a local file.

NSURLComponents

An object that parses URLs into and constructs URLs from their constituent parts.

NSURLQueryItem

An object representing a single name/value pair for an item in the query portion of a URL.

Unique Identifiers

NSUUID

A universally unique value that can be used to identify types, interfaces, and other items.

Geometry

CGFloat

The basic type for all floating-point values.

NSPoint

A point in a Cartesian coordinate system.

NSSize

A two-dimensional size.

NSRect

A rectangle.

NSAffineTransform

A graphics coordinate transformation.

NSEdgeInsets

A description of the distance between the edges of two rectangles.

Ranges

NSRange

A structure used to describe a portion of a series, such as characters in a string or objects in an array.

See Also

Fundamentals

Strings and Text

Create and process strings of Unicode characters, use regular expressions to find patterns, and perform natural language analysis of text.

Collections

Use arrays, dictionaries, sets, and specialized collections to store and iterate groups of objects or values.

Dates and Times

Compare dates and times, and perform calendar and time zone calculations.

Units and Measurement

Label numeric quantities with physical dimensions to allow locale-aware formatting and conversion between related units.

Data Formatting

Convert numbers, dates, measurements, and other values to and from locale-aware string representations.

Filters and Sorting

Use predicates, expressions, and sort descriptors to examine elements in collections and other services.