addFloatingSubview(_:for:)
Adds a floating subview to the document view.
Declaration
func addFloatingSubview(_ view: NSView, for axis: NSEvent.GestureAxis)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.