Mac Developer Library

Developer

Foundation Framework Reference NSRelativeSpecifier Class Reference

Options
Deployment Target:

On This Page
Language:

NSRelativeSpecifier

Specifies an object in a collection by its position relative to another object. You don’t normally subclass NSRelativeSpecifier.

Inheritance


Conforms To


Import Statement


import Foundation @import Foundation;

Availability


Available in OS X v10.0 and later.
  • Returns a specifier for the base object.

    Declaration

    Swift

    var baseSpecifier: NSScriptObjectSpecifier

    Objective-C

    @property(retain) NSScriptObjectSpecifier *baseSpecifier

    Return Value

    A specifier for the base object—the object to which the relative specifier is related.

    Import Statement

    import Foundation

    Availability

    Available in OS X v10.0 and later.

  • Returns the relative position encapsulated by the receiver.

    Declaration

    Swift

    var relativePosition: NSRelativePosition

    Objective-C

    @property NSRelativePosition relativePosition

    Return Value

    The relative position encapsulated by the receiver.

    Import Statement

    import Foundation

    Availability

    Available in OS X v10.0 and later.

  • Sets the specifier for the base object.

    Declaration

    Swift

    var baseSpecifier: NSScriptObjectSpecifier

    Objective-C

    @property(retain) NSScriptObjectSpecifier *baseSpecifier

    Parameters

    baseSpecifier

    The specifier for the base object—the object to which the relative specifier is related.

    Import Statement

    import Foundation

    Availability

    Available in OS X v10.0 and later.

  • Sets the relative position encapsulated by the receiver.

    Declaration

    Swift

    var relativePosition: NSRelativePosition

    Objective-C

    @property NSRelativePosition relativePosition

    Parameters

    relPos

    The relative position encapsulated by the receiver.

    Import Statement

    import Foundation

    Availability

    Available in OS X v10.0 and later.

Data Types

  • These constants are used by relativePosition and setRelativePosition:.

    Declaration

    Swift

    enum NSRelativePosition : UInt { case After case Before }

    Objective-C

    typedef enum { NSRelativeAfter = 0, NSRelativeBefore } NSRelativePosition;

    Constants

    • After

      NSRelativeAfter

      Specifies a position after another object.

      Available in OS X v10.0 and later.

    • Before

      NSRelativeBefore

      Specifies a position before another object.

      Available in OS X v10.0 and later.

    Import Statement

    import Foundation

    Availability

    Available in OS X v10.0 and later.