Mac Developer Library

Developer

Foundation Framework Reference NSIndexSpecifier Class Reference

Options
Deployment Target:

On This Page
Language:

NSIndexSpecifier

The NSIndexSpecifier class represents an object in a collection (or container) with an index number. The script terms first and front specify the object with index 0, while last specifies the object with index of count-1. A negative index indicates a location by counting backward from the last object in the collection.

You don’t normally subclass NSIndexSpecifier.

Inheritance


Conforms To


Import Statement


Swift

import Foundation

Objective-C

@import Foundation;

Availability


Available in OS X v10.0 and later.
  • Returns the value receiver’s index property.

    Declaration

    Swift

    var index: Int

    Objective-C

    @property NSInteger index

    Return Value

    Value of the receiver’s index property.

    Import Statement

    Objective-C

    @import Foundation;

    Swift

    import Foundation

    Availability

    Available in OS X v10.0 and later.

  • Sets the value of the receiver’s index property.

    Declaration

    Swift

    var index: Int

    Objective-C

    @property NSInteger index

    Parameters

    index

    Value for the receiver’s index property.

    Import Statement

    Objective-C

    @import Foundation;

    Swift

    import Foundation

    Availability

    Available in OS X v10.0 and later.