Use arrays, dictionaries, sets, and specialized collections to store and iterate groups of objects or values.
Framework
- Foundation
Use arrays, dictionaries, sets, and specialized collections to store and iterate groups of objects or values.
Framework
struct Array
An ordered, random-access collection.
struct Dictionary
A collection whose elements are key-value pairs.
struct Set
An unordered collection of unique elements.
struct Index Path
A list of indexes that together represent the path to a specific location in a tree of nested arrays.
struct Index Set
A collection of unique integer values that represent the indexes of elements in another collection.
class NSCounted Set
A mutable, unordered collection of distinct objects that may appear more than once in the collection.
class NSOrdered Set
A static, ordered collection of unique objects.
class NSMutable Ordered Set
A dynamic, ordered collection of unique objects.
class NSCache
A mutable collection you use to temporarily store transient key-value pairs that are subject to eviction when resources are low.
class NSPurgeable Data
A mutable data object containing bytes that can be discarded when they're no longer needed.
class NSPointer Array
A collection similar to an array, but with a broader range of available memory semantics.
class NSMap Table
A collection similar to a dictionary, but with a broader range of available memory semantics.
class NSHash Table
A collection similar to a set, but with broader range of available memory semantics.
class NSEnumerator
An abstract class whose subclasses enumerate collections of objects, such as arrays and dictionaries.
protocol NSFast Enumeration
A protocol that objects adopt to support fast enumeration.
struct NSIndex Set Iterator
An iterator suitable for enumerating the elements of an index set.
struct NSEnumeration Options
Options for block enumeration operations.
struct NSSort Options
Options for block sorting operations.
class NSNull
A singleton object used to represent null values in collection objects that don’t allow nil
values.
let NSNot Found: Int
A value indicating that a requested item couldn’t be found or doesn’t exist.
Work with primitive values and other fundamental types used throughout Cocoa.
Create and process strings of Unicode characters, use regular expressions to find patterns, and perform natural language analysis of text.
Compare dates and times, and perform calendar and time zone calculations.
Label numeric quantities with physical dimensions to allow locale-aware formatting and conversion between related units.
Convert numbers, dates, measurements, and other values to and from locale-aware string representations.
Use predicates, expressions, and sort descriptors to examine elements in collections and other services.