Mac Developer Library

Developer

Foundation Framework Reference NSUniqueIDSpecifier Class Reference

Options
Deployment Target:

On This Page
Language:

NSUniqueIDSpecifier

Specifies an object in a collection (or container) by unique ID. This specifier works only for objects that have an ID property. The unique ID object passed to an instance of NSUniqueIDSpecifier must be either an NSNumber object or an NSString object. The exact type should match the scripting dictionary declaration of the ID attribute for the relevant scripting class. More...

Inheritance


Conforms To


Import Statement


import Foundation @import Foundation;

Availability


Available in OS X v10.2 and later.
  • Sets the ID encapsulated by the receiver.

    Declaration

    Swift

    @NSCopying var uniqueID: AnyObject

    Objective-C

    @property(copy) id uniqueID

    Parameters

    uniqueID

    The ID for the receiver.

    uniqueID must be an instance of NSNumber or NSString. The type should match the declared type of the attribute of the specified scriptable class whose four-character code is 'ID '.

    Discussion

    Although NSUniqueIDSpecifier supports setting the unique ID, the ID for a specified object is likely to remain static over the life of the object.

    Import Statement

    import Foundation

    Availability

    Available in OS X v10.2 and later.

    See Also

    – uniqueID

  • Returns the ID encapsulated by the receiver.

    Declaration

    Swift

    @NSCopying var uniqueID: AnyObject

    Objective-C

    @property(copy) id uniqueID

    Return Value

    The ID encapsulated by the receiver.

    Import Statement

    import Foundation

    Availability

    Available in OS X v10.2 and later.