<!--
{
  "documentType" : "article",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/nsview-deprecated-symbols",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Deprecated Symbols"
}
-->

# Deprecated Symbols

Review unsupported symbols and their replacements.

## Topics

### Methods

[`func lockFocus()`](/documentation/AppKit/NSView/lockFocus())

Locks the focus on the view, so subsequent commands take effect in the view’s window and coordinate system.

[`func lockFocusIfCanDraw() -> Bool`](/documentation/AppKit/NSView/lockFocusIfCanDraw())

Locks the focus to the view atomically if the `canDraw` method returns `true` and returns the value of `canDraw`.

[`func lockFocusIfCanDraw(in: NSGraphicsContext) -> Bool`](/documentation/AppKit/NSView/lockFocusIfCanDraw(in:))

Locks the focus to the view atomically if drawing can occur in the specified graphics context.

[`func unlockFocus()`](/documentation/AppKit/NSView/unlockFocus())

Unlocks focus from the current view.

[`func scroll(NSRect, by: NSSize)`](/documentation/AppKit/NSView/scroll(_:by:))

Copies the visible portion of the view’s rendered image within a region and lays that portion down again at a specified offset .

[`- (NSPoint) convertPointToBase:(NSPoint) point;`](/documentation/AppKit/NSView/convertPointToBase:)

Converts the point from the view’s coordinate system to the base coordinate system.

[`- (NSPoint) convertPointFromBase:(NSPoint) point;`](/documentation/AppKit/NSView/convertPointFromBase:)

Converts the point from the base coordinate system to the view’s coordinate system.

[`- (NSSize) convertSizeToBase:(NSSize) size;`](/documentation/AppKit/NSView/convertSizeToBase:)

Converts the size from the view’s coordinate system to the base coordinate system.

[`- (NSSize) convertSizeFromBase:(NSSize) size;`](/documentation/AppKit/NSView/convertSizeFromBase:)

Converts the size from the base coordinate system to the view’s coordinate system.

[`- (NSRect) convertRectToBase:(NSRect) rect;`](/documentation/AppKit/NSView/convertRectToBase:)

Converts the rectangle from the view’s coordinate system to the base coordinate system.

[`- (NSRect) convertRectFromBase:(NSRect) rect;`](/documentation/AppKit/NSView/convertRectFromBase:)

Converts the rectangle from the base coordinate system to the view’s coordinate system.

[`- (BOOL) performMnemonic:(NSString *) string;`](/documentation/AppKit/NSView/performMnemonic:)

Implemented by subclasses to respond to mnemonics.

[`func shouldDrawColor() -> Bool`](/documentation/AppKit/NSView/shouldDrawColor())

Returns a Boolean value indicating whether the view is being drawn to an environment that supports color.

[`func allocateGState()`](/documentation/AppKit/NSView/allocateGState())

Causes the view to maintain a private graphics state object, which encapsulates all parameters of the graphics environment.

[`func gState() -> Int`](/documentation/AppKit/NSView/gState())

Returns the identifier for the view’s graphics state object, or 0 if the view doesn’t have a graphics state object.

[`func setUpGState()`](/documentation/AppKit/NSView/setUpGState())

Overridden by subclasses to (re)initialize the view’s graphics state object.

[`func renewGState()`](/documentation/AppKit/NSView/renewGState())

Invalidates the view’s graphics state object, if it has one.

[`func releaseGState()`](/documentation/AppKit/NSView/releaseGState())

Frees the view’s graphics state object, if it has one.

[`- (void) dragImage:(NSImage *) image at:(NSPoint) viewLocation offset:(NSSize) initialOffset event:(NSEvent *) event pasteboard:(NSPasteboard *) pboard source:(id) sourceObj slideBack:(BOOL) slideFlag;`](/documentation/AppKit/NSView/dragImage:at:offset:event:pasteboard:source:slideBack:)

Initiates a dragging operation from the view, allowing the user to drag arbitrary data with a specified icon into any application that has window or view objects that accept dragged data.

[`func dragFile(String, from: NSRect, slideBack: Bool, event: NSEvent) -> Bool`](/documentation/AppKit/NSView/dragFile(_:from:slideBack:event:))

Initiates a dragging operation from the view, allowing the user to drag a file icon to any application that has window or view objects that accept files.

[`func dragPromisedFiles(ofTypes: [String], from: NSRect, source: Any, slideBack: Bool, event: NSEvent) -> Bool`](/documentation/AppKit/NSView/dragPromisedFiles(ofTypes:from:source:slideBack:event:))

Initiates a dragging operation from the view, allowing the user to drag one or more promised files (or directories) into any application that has window or view objects that accept promised file data.

### Properties

[`var wantsExtendedDynamicRangeOpenGLSurface: Bool`](/documentation/AppKit/NSView/wantsExtendedDynamicRangeOpenGLSurface)

[`var acceptsTouchEvents: Bool`](/documentation/AppKit/NSView/acceptsTouchEvents)

A Boolean value indicating whether the view accepts touch events.

[`var canDraw: Bool`](/documentation/AppKit/NSView/canDraw)

A Boolean value indicating whether drawing commands will produce any results.

[`var wantsBestResolutionOpenGLSurface: Bool`](/documentation/AppKit/NSView/wantsBestResolutionOpenGLSurface)

A Boolean value indicating whether the view wants an OpenGL backing surface with a resolution greater than 1 pixel per point.

### Notifications

[`extern const CGFloat NSViewNoInstrinsicMetric;`](/documentation/AppKit/NSViewNoInstrinsicMetric)

Used to indicate that a view has no intrinsic metric for a given numeric property.

[`extern NSNotificationName NSViewFocusDidChangeNotification;`](/documentation/AppKit/NSViewFocusDidChangeNotification)

Deprecated in macOS 10.4 and later. Posted for an `NSView` object and each of its descendants (recursively) whenever the frame or bounds geometry of the view changed.

[`class let globalFrameDidChangeNotification: NSNotification.Name`](/documentation/AppKit/NSView/globalFrameDidChangeNotification)

Posted whenever an `NSView` object that has attached surfaces (that is, `NSOpenGLContext` objects) moves to a different screen, or other cases where the `NSOpenGLContext` object needs to be updated.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)