iOS Developer Library

Developer

CoreFoundation Framework Reference CFNull Reference

Options
Deployment Target:

On This Page
Language:

CFNull Reference

The CFNull opaque type defines a unique object used to represent null values in collection objects (which don’t allow NULL values). CFNull objects are neither created nor destroyed. Instead, a single CFNull constant object—kCFNull—is defined and is used wherever a null value is needed.

The CFNull opaque type is available in OS X v10.2 and later.

Functions

  • Returns the type identifier for the CFNull opaque type.

    Declaration

    Swift

    func CFNullGetTypeID() -> CFTypeID

    Objective-C

    CFTypeID CFNullGetTypeID ( void );

    Return Value

    The type identifier for the CFNull opaque type.

    Import Statement

    Objective-C

    @import CoreFoundation;

    Swift

    import CoreFoundation

    Availability

    Available in iOS 2.0 and later.

Data Types

Miscellaneous

  • A reference to a CFNull object.

    Declaration

    Swift

    typealias CFNullRef = CFNull

    Objective-C

    typedef const struct __CFNull *CFNullRef;

    Import Statement

    Objective-C

    @import CoreFoundation;

    Swift

    import CoreFoundation

    Availability

    Available in iOS 2.0 and later.

Constants

Miscellaneous

  • Predefined CFNull object.

    Declaration

    Swift

    let kCFNull: CFNull!

    Objective-C

    const CFNullRef kCFNull;

    Constants

    • kCFNull

      kCFNull

      The singleton CFNull object.

      Available in iOS 2.0 and later.