Mac Developer Library

Developer

AppKit Framework Reference NSStepper Class Reference

Options
Deployment Target:

On This Page
Language:

NSStepper

Inheritance


Import Statement


Swift

import AppKit

Objective-C

@import AppKit;

Availability


Available in OS X v10.0 and later.

A stepper consists of two small arrows that can increment and decrement a value that appears beside it, such as a date or time. The illustration below shows a stepper to the right of a text field, which would show the stepper’s value.

image: ../Art/stepper2_2x.png

The NSStepper class uses the NSStepperCell class to implement its user interface.

  • maxValue maxValue Property

    The stepper’s maximum value.

    Declaration

    Swift

    var maxValue: Double

    Objective-C

    @property double maxValue

    Discussion

    The default is 59.

    Import Statement

    Objective-C

    @import AppKit;

    Swift

    import AppKit

    Availability

    Available in OS X v10.0 and later.

  • minValue minValue Property

    The stepper’s minimum value.

    Declaration

    Swift

    var minValue: Double

    Objective-C

    @property double minValue

    Discussion

    The default is 0.

    Import Statement

    Objective-C

    @import AppKit;

    Swift

    import AppKit

    Availability

    Available in OS X v10.0 and later.

  • increment increment Property

    The amount by which the receiver changes with each increment or decrement.

    Declaration

    Swift

    var increment: Double

    Objective-C

    @property double increment

    Discussion

    The default is 1.

    Import Statement

    Objective-C

    @import AppKit;

    Swift

    import AppKit

    Availability

    Available in OS X v10.0 and later.

  • A Boolean value that indicates how the stepper responds to mouse events.

    Declaration

    Swift

    var autorepeat: Bool

    Objective-C

    @property BOOL autorepeat

    Discussion

    YEStrue if the first mouse down does one increment (or decrement) and, after a delay of 0.5 seconds, increments (or decrements) at a rate of ten times per second. NOfalse if the receiver does one increment (decrement) on a mouse up. The default is YEStrue.

    Import Statement

    Objective-C

    @import AppKit;

    Swift

    import AppKit

    Availability

    Available in OS X v10.0 and later.

  • A Boolean value that indicates whether the stepper wraps around the minimum and maximum values.

    Declaration

    Swift

    var valueWraps: Bool

    Objective-C

    @property BOOL valueWraps

    Discussion

    YEStrue if, when incrementing or decrementing, the value wraps around to the minimum or maximum. NOfalse if the value stays pinned at the minimum or maximum. The default is YEStrue.

    Import Statement

    Objective-C

    @import AppKit;

    Swift

    import AppKit

    Availability

    Available in OS X v10.0 and later.