Mac Developer Library

Developer

AppKit Framework Reference NSScrollView Class Reference

Options
Deployment Target:

On This Page
Language:

NSScrollView

The NSScrollView class is the central coordinator for the Application Kit’s scrolling machinery, composed of this class, and the NSClipView, and NSScroller classes. A scroll view displays a portion of a document view that’s too large to be displayed whole and provides scroll bars that allow the user to move the document view within the scroll view.

Note that, when using an NSClipView object within an scroll view (the usual configuration), you should issue messages that control background drawing state to the scroll view directly, rather than messaging the clip view.

  • The color of the content view’s background.

    Declaration

    Swift

    @NSCopying var backgroundColor: NSColor

    Objective-C

    @property(copy) NSColor *backgroundColor

    Discussion

    This color is used to paint areas inside the content view that aren’t covered by the document view.

    Availability

    Available in OS X v10.0 and later.

    See Also

    setBackgroundColor: (NSClipView)

  • A Boolean that indicates whether the scroll view draws its background.

    Declaration

    Swift

    var drawsBackground: Bool

    Objective-C

    @property BOOL drawsBackground

    Discussion

    When the value of this property is YEStrue, the scroll view cell fills the background with its background color.

    If the scroll view encloses an NSClipView, setting this property to NOfalse also sets the NSClipView property copiesOnScroll to NOfalse. The side effect of setting drawsBackground directly on the NSClipView instead is the appearance of “trails” (vestiges of previous drawing) in the document view as it is scrolled.

    Availability

    Available in OS X v10.0 and later.

    See Also

    copiesOnScroll (NSClipView)
    setDrawsBackground: (NSClipView)

  • A value that specifies the appearance of the scroll view’s border.

    Declaration

    Swift

    var borderType: NSBorderType

    Objective-C

    @property NSBorderType borderType

    Discussion

    See NSBorderType for a list of possible values.

    Availability

    Available in OS X v10.0 and later.

  • The content view’s document cursor.

    Declaration

    Swift

    var documentCursor: NSCursor?

    Objective-C

    @property(strong) NSCursor *documentCursor

    Availability

    Available in OS X v10.0 and later.

    See Also

    documentCursor (NSClipView)

  • The scroll view’s content view, the view that clips the document view.

    Declaration

    Swift

    var contentView: NSClipView

    Objective-C

    @property(strong) NSClipView *contentView

    Discussion

    Setting the value of this property to an NSClipView that has a document view also sets the scroll view’s document view to be the document view of that NSClipView. The original content view retains its document view.

    Availability

    Available in OS X v10.0 and later.

    See Also

    documentView

  • The view the scroll view scrolls within its content view.

    Declaration

    Swift

    unowned(unsafe) var documentView: AnyObject?

    Objective-C

    @property(assign) id documentView

    Availability

    Available in OS X v10.0 and later.

    See Also

    documentView (NSClipView)

  • Adds a floating subview to the document view.

    Declaration

    Swift

    func addFloatingSubview(_ view: NSView, forAxis axis: NSEventGestureAxis)

    Objective-C

    - (void)addFloatingSubview:(NSView *)view forAxis:(NSEventGestureAxis)axis

    Parameters

    view

    The view that can float.

    axis

    The event gesture axis on which the view can float. A view can float on only one axis at a time.

    Discussion

    Floating subviews of the document view do not scroll like the rest of the document. Instead these views appear to float over the document. For example, see NSTableView floating group rows (floatsGroupRows).

    NSScrollView ensures that any scrolling on the non-floating axis is performed visually synchronously with the document content.

    Availability

    Available in OS X v10.9 and later.

  • The scroll view’s horizontal scroller.

    Declaration

    Swift

    var horizontalScroller: NSScroller?

    Objective-C

    @property(strong) NSScroller *horizontalScroller

    Discussion

    The value of this property is nil if the scroll view has no horizontal scroller.

    You can access the horizontal scroller using this property even if the scroll view isn’t currently displaying it. To make sure the scroller is visible, set hasHorizontalScroller to YEStrue.

    Availability

    Available in OS X v10.0 and later.

  • A Boolean that indicates whether the scroll view has a horizontal scroller.

    Declaration

    Swift

    var hasHorizontalScroller: Bool

    Objective-C

    @property BOOL hasHorizontalScroller

    Discussion

    When the value of this property is YEStrue, the scroll view allocates and displays a horizontal scroller as needed. The default value of this property is NOfalse.

    Availability

    Available in OS X v10.0 and later.

  • The scroll view’s vertical scroller.

    Declaration

    Swift

    var verticalScroller: NSScroller?

    Objective-C

    @property(strong) NSScroller *verticalScroller

    Discussion

    The value of this property is nil if the scroll view has no vertical scroller.

    You can access the vertical scroller using this property even if the scroll view isn’t currently displaying it. To make sure the scroller is visible, set hasVerticalScroller to YEStrue.

    Availability

    Available in OS X v10.0 and later.

  • A Boolean that indicates whether the scroll view has a vertical scroller.

    Declaration

    Swift

    var hasVerticalScroller: Bool

    Objective-C

    @property BOOL hasVerticalScroller

    Discussion

    When the value of this property is YEStrue, the scroll view allocates and displays a vertical scroller as needed. The default value of this property is NOfalse.

    Availability

    Available in OS X v10.0 and later.

  • A Boolean that indicates whether the scroll view automatically hides its scroll bars when they are not needed.

    Declaration

    Swift

    var autohidesScrollers: Bool

    Objective-C

    @property BOOL autohidesScrollers

    Discussion

    The horizontal and vertical scroll bars are hidden independently of each other. When the value of this property is YEStrue and the content of the scroll view doesn't extend beyond the size of the clip view on a given axis, the scroller on that axis is removed to leave more room for the content.

    Availability

    Available in OS X v10.3 and later.

    See Also

    scrollerStyle

  • Sets the default class to be used for ruler objects in NSScrollViews to aClass.

    Declaration

    Swift

    class func setRulerViewClass(_ rulerViewClass: AnyClass?)

    Objective-C

    + (void)setRulerViewClass:(Class)rulerViewClass

    Discussion

    This class is normally NSRulerView, but you can use this method to set it to a custom subclass of NSRulerView.

    This method simply sets a global variable private to NSScrollView. Subclasses of NSScrollView should override both this method and rulerViewClass to store their ruler view classes in private variables.

    Availability

    Available in OS X v10.0 and later.

  • Returns the default class to be used for ruler objects in NSScrollViews.

    Declaration

    Swift

    class func rulerViewClass() -> AnyClass

    Objective-C

    + (Class)rulerViewClass

    Discussion

    This class is normally NSRulerView.

    Availability

    Available in OS X v10.0 and later.

  • A Boolean that indicates whether the scroll view keeps a horizontal ruler object.

    Declaration

    Swift

    var hasHorizontalRuler: Bool

    Objective-C

    @property BOOL hasHorizontalRuler

    Discussion

    When the value of this method is YEStrue, the scroll view allocates a horizontal ruler the first time it’s needed.

    Display of rulers is controlled using the rulersVisible property.

    Availability

    Available in OS X v10.0 and later.

  • The scroll view’s horizontal ruler view.

    Declaration

    Swift

    var horizontalRulerView: NSRulerView?

    Objective-C

    @property(strong) NSRulerView *horizontalRulerView

    Discussion

    The value of this property is nil when the scroll view has no horizontal ruler view.

    If the scroll view is set to display a horizontal ruler view and doesn’t yet have one, this property creates an instance of the ruler view class set using the class method setRulerViewClass:. You can use this property to override the default ruler class set using the class method setRulerViewClass:.

    Display of rulers is controlled using the rulersVisible property.

    Availability

    Available in OS X v10.0 and later.

  • A Boolean that indicates whether the scroll view keeps a vertical ruler object.

    Declaration

    Swift

    var hasVerticalRuler: Bool

    Objective-C

    @property BOOL hasVerticalRuler

    Discussion

    When the value of this method is YEStrue, the scroll view allocates a vertical ruler the first time it’s needed.

    Display of rulers is controlled using the rulersVisible property.

    Availability

    Available in OS X v10.0 and later.

  • The scroll view’s vertical ruler view.

    Declaration

    Swift

    var verticalRulerView: NSRulerView?

    Objective-C

    @property(strong) NSRulerView *verticalRulerView

    Discussion

    The value of this property is nil when the scroll view has no vertical ruler view.

    If the scroll view is set to display a vertical ruler view and doesn’t yet have one, this property creates an instance of the ruler view class set using the class method setRulerViewClass:. You can use this property to override the default ruler class set using the class method setRulerViewClass:.

    Display of rulers is controlled using the rulersVisible property.

    Availability

    Available in OS X v10.0 and later.

  • A Boolean that indicates whether the scroll view displays its rulers.

    Declaration

    Swift

    var rulersVisible: Bool

    Objective-C

    @property BOOL rulersVisible

    Discussion

    When the value of this property is YEStrue, the scroll view displays its rulers (creating them if needed). When the value of this property is NOfalse, the scroll view doesn’t display its rulers.

    Availability

    Available in OS X v10.0 and later.

  • A Boolean that indicates whether the scroll view automatically adjusts its content insets.

    Declaration

    Swift

    var automaticallyAdjustsContentInsets: Bool

    Objective-C

    @property BOOL automaticallyAdjustsContentInsets

    Discussion

    When the value of this property is YEStrue, the scroll view automatically sets its contentInsets property to account for any overlapping title or tool bar. To overlap with the title or tool bar, the window style mask must include NSFullSizeContentViewWindowMask and the title bar must not be transparent.

    The default value of this property is YEStrue.

    Availability

    Available in OS X v10.10 and later.

  • The distance that the scroll view’s subviews are inset from the enclosing scroll view during tiling.

    Declaration

    Swift

    var contentInsets: NSEdgeInsets

    Objective-C

    @property NSEdgeInsets contentInsets

    Discussion

    When the value of this property is equal to NSEdgeInsetsZero, traditional tiling is performed. Rulers, headers, and other subviews are tiled with the contentView frame filling the remaining space. When the value of this property is not equal to NSEdgeInsetsZero, the rulers, headers, and other subviews are inset as specified. The contentView is placed underneath these sibling views and is only inset by the scroll view border and non-overlay scrollers.

    See NSEdgeInsets for possible values.

    When the value of the automaticallyAdjustsContentInsets property is YEStrue, any value of this property is overridden during tiling.

    Availability

    Available in OS X v10.10 and later.

  • The distance the scrollers are inset from the edge of the scroll view.

    Declaration

    Swift

    var scrollerInsets: NSEdgeInsets

    Objective-C

    @property NSEdgeInsets scrollerInsets

    Availability

    Available in OS X v10.10 and later.

  • The knob style of scroll views that use the overlay scroller style.

    Declaration

    Swift

    var scrollerKnobStyle: NSScrollerKnobStyle

    Objective-C

    @property NSScrollerKnobStyle scrollerKnobStyle

    Discussion

    See NSScrollerKnobStyle for possible values.

    Applicable only to scroll views that use overlay scrollers.

    Availability

    Available in OS X v10.7 and later.

  • The scroller style used by the scroll view.

    Declaration

    Swift

    var scrollerStyle: NSScrollerStyle

    Objective-C

    @property NSScrollerStyle scrollerStyle

    Discussion

    See NSScrollerStyle for possible values.

    This setting is automatically set at runtime, based on the user's preference setting and, if relevant, the set of connected pointing devices and their configured scroll capabilities, as determined by the NSScroller method preferredScrollerStyle.

    Setting an scroll view’s scroller style sets the style of both the horizontal and vertical scrollers. If the scroll view subsequently creates or is assigned a new horizontal or vertical scroller, they are assigned the same scroller style assigned to the scroll view.

    Availability

    Available in OS X v10.7 and later.

  • The scroll view’s line by line scroll amount.

    Declaration

    Swift

    var lineScroll: CGFloat

    Objective-C

    @property CGFloat lineScroll

    Discussion

    The value of this property is the amount by which the scroll view scrolls itself when scrolling line by line, expressed in the content view’s coordinate system. This value is used when the user clicks the scroll arrows without holding down a modifier key. When displaying text in a scroll view, for example, you might set this value to the height of a single line of text in the default font. As part of its implementation, this property accesses verticalLineScroll.

    Note that a scroll view can have two different line scroll amounts: verticalLineScroll and horizontalLineScroll. Set this property only if you can be sure they’re both the same; setting this property sets both verticalLineScroll and horizontalLineScroll to the same value.

    Availability

    Available in OS X v10.0 and later.

  • The scroll view’s horizontal line by line scroll amount.

    Declaration

    Swift

    var horizontalLineScroll: CGFloat

    Objective-C

    @property CGFloat horizontalLineScroll

    Discussion

    The value of this property is the amount by which the scroll view scrolls itself horizontally when scrolling line by line, expressed in the content view’s coordinate system. This value is used when the user clicks the scroll arrows on the horizontal scroll bar without holding down a modifier key.

    Availability

    Available in OS X v10.0 and later.

  • The scroll view’s vertical line by line scroll amount.

    Declaration

    Swift

    var verticalLineScroll: CGFloat

    Objective-C

    @property CGFloat verticalLineScroll

    Discussion

    The value of this property is the amount by which the scroll view scrolls itself vertically when scrolling line by line, expressed in the content view’s coordinate system. This value is used when the user clicks the scroll arrows on the vertical scroll bar without holding down a modifier key.

    Availability

    Available in OS X v10.0 and later.

  • The amount of the document view kept visible when scrolling page by page.

    Declaration

    Swift

    var pageScroll: CGFloat

    Objective-C

    @property CGFloat pageScroll

    Discussion

    The value of this property is the amount of the document view kept visible when scrolling page by page, expressed in the content view’s coordinate system. This value is used when the user clicks the scroll arrows while holding down the Option key. As part of its implementation, this property accesses verticalPageScroll.

    This amount expresses the context that remains when the scroll view scrolls by one page, allowing the user to orient to the new display. It differs from the line scroll amount, which indicates how far the document view moves. The page scroll amount is the amount common to the content view before and after the document view is scrolled by one page. Thus, setting the page scroll amount to 0.0 implies that the entire visible portion of the document view is replaced when a page scroll occurs.

    Note that a scroll view can have two different page scroll amounts: verticalPageScroll and horizontalPageScroll. Set this property only if you can be sure they’re both the same; setting this property sets both verticalPageScroll and horizontalPageScroll to the same value.

    Availability

    Available in OS X v10.0 and later.

  • The amount of the document view kept visible when scrolling horizontally page by page.

    Declaration

    Swift

    var horizontalPageScroll: CGFloat

    Objective-C

    @property CGFloat horizontalPageScroll

    Discussion

    The value of this property is the amount of the document view kept visible when scrolling horizontally page by page, expressed in the content view’s coordinate system. This value is used when the user clicks the scroll arrows on the horizontal scroll bar while holding down the Option key.

    This amount expresses the context that remains when the receiver scrolls by one page, allowing the user to orient to the new display. It differs from the line scroll amount, which indicates how far the document view moves. The page scroll amount is the amount common to the content view before and after the document view is scrolled by one page. Thus, setting the page scroll amount to 0.0 implies that the entire visible portion of the document view is replaced when a page scroll occurs.

    Availability

    Available in OS X v10.0 and later.

  • The amount of the document view kept visible when scrolling vertically page by page.

    Declaration

    Swift

    var verticalPageScroll: CGFloat

    Objective-C

    @property CGFloat verticalPageScroll

    Discussion

    The value of this property is the amount of the document view kept visible when scrolling vertically page by page, expressed in the content view’s coordinate system. This value is used when the user clicks the scroll arrows on the vertical scroll bar while holding down the Option key.

    This amount expresses the context that remains when the receiver scrolls by one page, allowing the user to orient to the new display. It differs from the line scroll amount, which indicates how far the document view moves. The page scroll amount is the amount common to the content view before and after the document view is scrolled by one page. Thus, setting the page scroll amount to 0.0 implies that the entire visible portion of the document view is replaced when a page scroll occurs.

    Availability

    Available in OS X v10.0 and later.

  • A Boolean that indicates whether the scroll view redraws its document view while scrolling continuously.

    Declaration

    Swift

    var scrollsDynamically: Bool

    Objective-C

    @property BOOL scrollsDynamically

    Discussion

    When the value of this property is YEStrue, the scroll view redraws its document view while scrolling. When the value of this property isNOfalse, the scroll view redraws only when the scroller knob is released. The default value of this property is YEStrue.

    Availability

    Available in OS X v10.0 and later.

  • Scrolls the receiver up or down, in response to the user moving the mouse’s scroll wheel specified by theEvent.

    Declaration

    Swift

    func scrollWheel(_ theEvent: NSEvent)

    Objective-C

    - (void)scrollWheel:(NSEvent *)theEvent

    Availability

    Available in OS X v10.0 and later.

  • Adjusts the receiver’s scrollers to reflect the size and positioning of its content view.

    Declaration

    Swift

    func reflectScrolledClipView(_ cView: NSClipView)

    Objective-C

    - (void)reflectScrolledClipView:(NSClipView *)aClipView

    Parameters

    aClipView

    The clip view being adjusted to. If aClipView is any view object other than the receiver’s content view, the method does nothing.

    Discussion

    This method is invoked automatically during scrolling and when an NSClipView object’s relationship to its document view changes; you should rarely need to invoke it yourself, but may wish to override it for custom updating or other behavior. If you override this method, be sure to call the superclass implementation. If you do not, other controls (such as the current scrollers) may not be updated properly.

    Availability

    Available in OS X v10.0 and later.

  • Lays out the components of the receiver: the content view, the scrollers, and the ruler views.

    Declaration

    Swift

    func tile()

    Objective-C

    - (void)tile

    Discussion

    You rarely need to invoke this method, but subclasses may override it to manage additional components.

    Availability

    Available in OS X v10.0 and later.

  • A Boolean that indicates whether the scroll view uses a predominant scrolling axis for content.

    Declaration

    Swift

    var usesPredominantAxisScrolling: Bool

    Objective-C

    @property BOOL usesPredominantAxisScrolling

    Discussion

    Some content is scrollable in both the horizontal and vertical axes, but is predominantly scrolled one axis at a time. Other content (such as a drawing canvas) should scroll freely in both axes.

    Traditionally this is not an issue with scroll wheels since they can only scroll in one direction at a time. With scroll balls and touch surfaces, it becomes more difficult to determine the user's intention.

    This property helps a scroll view determine the user's intention by specifying if there is a predominant scrolling axis for content.

    When the value of this property is YEStrue, the scroll view uses a predominant scrolling access. The default value of this property is YEStrue.

    Availability

    Available in OS X v10.7 and later.

  • Flash the overlay scroll bars.

    Declaration

    Swift

    func flashScrollers()

    Objective-C

    - (void)flashScrollers

    Discussion

    This method is only to scroll views that use overlay scrollers.

    This method can be invoked to cause the overlay scroller knobs to be momentarily shown. This may be desirable when changing a document view's size or swapping new content into the view, or to give the user a sense of the current position within the scrollable range at each step of an incremental search or similar operation.

    Availability

    Available in OS X v10.7 and later.

  • Allows the user to magnify the scroll view.

    Declaration

    Swift

    var allowsMagnification: Bool

    Objective-C

    @property BOOL allowsMagnification

    Discussion

    This property does not prevent the developer from manually adjusting the magnification value. If magnification exceeds either the maximum or minimum limits for magnification, and allowsMagnification is YEStrue, the scroll view temporarily animates the content magnification just past those limits before returning to them. The default value is NOfalse.

    Availability

    Available in OS X v10.8 and later.

  • The amount by which the content is currently scaled.

    Declaration

    Swift

    var magnification: CGFloat

    Objective-C

    @property CGFloat magnification

    Discussion

    To animate the magnification, use the object's animator. The default value is 1.0.

    Availability

    Available in OS X v10.8 and later.

  • Magnifies the content view proportionally such that the given rectangle fits centered in the scroll view.

    Declaration

    Swift

    func magnifyToFitRect(_ rect: NSRect)

    Objective-C

    - (void)magnifyToFitRect:(NSRect)rect

    Parameters

    rect

    The rectangle (in content view space) to which the content view is magnified.

    Discussion

    The resulting magnification value is clipped to the minMagnification and maxMagnification values. To animate the magnification, use the object's animator.

    Availability

    Available in OS X v10.8 and later.

  • The maximum value to which the content can be magnified.

    Declaration

    Swift

    var maxMagnification: CGFloat

    Objective-C

    @property CGFloat maxMagnification

    Discussion

    This value must be greater than or equal to the minimum magnification. The default value is 4.0.

    Availability

    Available in OS X v10.8 and later.

  • The minimum value to which the content can be magnified.

    Declaration

    Swift

    var minMagnification: CGFloat

    Objective-C

    @property CGFloat minMagnification

    Discussion

    The default value is 0.25.

    Availability

    Available in OS X v10.8 and later.

  • Magnify the content by the given amount and center the result on the given point.

    Declaration

    Swift

    func setMagnification(_ magnification: CGFloat, centeredAtPoint point: NSPoint)

    Objective-C

    - (void)setMagnification:(CGFloat)magnification centeredAtPoint:(NSPoint)point

    Parameters

    magnification

    The amount by which to magnify the content.

    point

    The point (in content view space) on which to center magnification.

    Discussion

    This method scales the content view such that the passed in point (in content view space) remains at the same screen location once the scaling is completed. The resulting magnification value is clipped to the minMagnification and maxMagnification values. To animate the magnification, use the object's animator.

    Availability

    Available in OS X v10.8 and later.

  • These constants determine the elasticity behavior for an axis of the scrollview.

    Declaration

    Swift

    enum NSScrollElasticity : Int { case Automatic case None case Allowed }

    Objective-C

    enum { NSScrollElasticityAutomatic = 0, NSScrollElasticityNone = 1, NSScrollElasticityAllowed = 2, }; typedef NSInteger NSScrollElasticity;

    Constants

    • Automatic

      NSScrollElasticityAutomatic

      Automatically determine whether to allow elasticity on this axis.

      Available in OS X v10.7 and later.

    • None

      NSScrollElasticityNone

      Disallow scrolling beyond document bounds on this axis.

      Available in OS X v10.7 and later.

    • Allowed

      NSScrollElasticityAllowed

      Allow content to be scrolled past its bounds on this axis in an elastic fashion.

      Available in OS X v10.7 and later.

    Import Statement

    Objective-C

    @import AppKit;

    Swift

    import AppKit

    Availability

    Available in OS X v10.7 and later.

  • These constants define the position of the find bar in relation to the scroll view.

    Declaration

    Swift

    enum NSScrollViewFindBarPosition : Int { case AboveHorizontalRuler case AboveContent case BelowContent }

    Objective-C

    enum { NSScrollViewFindBarPositionAboveHorizontalRuler = 0, NSScrollViewFindBarPositionAboveContent = 1, NSScrollViewFindBarPositionBelowContent = 2 }; typedef NSInteger NSScrollViewFindBarPosition;

    Constants

    • AboveHorizontalRuler

      NSScrollViewFindBarPositionAboveHorizontalRuler

      The find bar is displayed above the horizontal ruler, if visible.

      Available in OS X v10.7 and later.

    • AboveContent

      NSScrollViewFindBarPositionAboveContent

      The find bar is displayed above the scroll view content.

      Available in OS X v10.7 and later.

    • BelowContent

      NSScrollViewFindBarPositionBelowContent

      The find bar is displayed below the scroll view content.

      Available in OS X v10.7 and later.

    Import Statement

    Objective-C

    @import AppKit;

    Swift

    import AppKit

    Availability

    Available in OS X v10.7 and later.

  • Posted at the beginning of a magnify gesture.

    The notification object is the scroll view performing the magnification.

    This notification indicates that the magnification property is being changed due to user action. This may be due to the user performing a pinch gesture or a smart zoom gesture. When animating the magnification value yourself via the object's animator, this notification is not sent.

    Declaration

    Swift

    let NSScrollViewWillStartLiveMagnifyNotification: String

    Import Statement

    Objective-C

    @import AppKit;

    Swift

    import AppKit

    Availability

    Available in OS X v10.8 and later.

  • Posted at the end of a magnify gesture.

    The notification object is the scroll view performing the magnification.

    This notification indicates that the magnification property is being changed due to user action. This may be due to the user performing a pinch gesture or a smart zoom gesture. When animating the magnification value yourself via the object's animator, this notification is not sent.

    Declaration

    Swift

    let NSScrollViewDidEndLiveMagnifyNotification: String

    Import Statement

    Objective-C

    @import AppKit;

    Swift

    import AppKit

    Availability

    Available in OS X v10.8 and later.

  • Posted on the main thread at the beginning of user-initiated live scroll tracking (gesture scroll or scroller tracking, for example, thumb dragging).

    The notification object is the scroll view performing the scroll.

    Declaration

    Swift

    let NSScrollViewWillStartLiveScrollNotification: String

    Import Statement

    Objective-C

    @import AppKit;

    Swift

    import AppKit

    Availability

    Available in OS X v10.9 and later.

  • Posted on the main thread after changing the clipview bounds origin due to a user-initiated event.

    Some user-initiated scrolls (for example, scrolling using legacy mice) are not bracketed by a “willStart/didEnd” notification pair.

    The notification object is the scroll view performing the scroll.

    Declaration

    Swift

    let NSScrollViewDidLiveScrollNotification: String

    Import Statement

    Objective-C

    @import AppKit;

    Swift

    import AppKit

    Availability

    Available in OS X v10.9 and later.

  • Posted on the main thread at the end of live scroll tracking.

    The notification object is the scroll view performing the scroll.

    Declaration

    Swift

    let NSScrollViewDidEndLiveScrollNotification: String

    Import Statement

    Objective-C

    @import AppKit;

    Swift

    import AppKit

    Availability

    Available in OS X v10.9 and later.