AppKit in macOS 27
macOS Golden Gate 27 Beta Release Notes:
AppKit adds
NSRefreshController, providing pull-to-refresh functionality forNSScrollView.[…]
NSToolbarItemGroupadds theroleproperty and theNSToolbarItemGroupRoleenum, allowing toolbar item groups to be tagged with a semantic role.NSSegmentedControlsimilarly adds aroleproperty and theNSSegmentedControlRoleenum, including atabsrole for controls that represent tab-based navigation and content selection.[…]
NSTextSelectionManagerprovides common text selection interactions (click, drag, shift-click, double/triple-click word/line/paragraph selection) to aNSViewwith a set ofNSGestureRecognizersrather than overridingNSEventmouse methods.NSTextViewnow usesNSTextSelectionManagerand provides its own set ofNSGestureRecognizersto provide additional features in addition to text selection.[…]
By default,
NSMenuhides all menu item symbol images — non-symbol images remain visible. […] Use the newpreferredImageVisibilityproperty onNSMenuItemto customize the image visibility for your menu items. As in macOS 26.0,NSMenuautomatically provides default visible menu item images for certain common system-wide menu items, such as Settings, Share, and Print.
Create events similar to
UIControlevents onNSControlwith the newNSControl.Eventstype.[…]
Initiate a drag operation from a gesture recognizer using the new
beginDraggingSession(items:gesture:source:)method onNSView.[…]
Update views automatically in response to
Observablemodel changes using the guidance in Updating views automatically with observation tracking.
How is this different from what was announced last year?
Bring your AppKit app up to date with modern macOS conventions. Dive into handling input with control events and gesture recognizers, moving beyond traditional tracking loops. Enhance keyboard navigation in your app, implement graceful state restoration after restarts, and take advantage of new corner concentricity APIs that let your interface blend seamlessly with the macOS aesthetic.
To summarize the singular AppKit session this year: hey remember all these APIs and design patterns from UIKit? Well they’re now in AppKit and you should use them! Also make your glass use interactive bounce effects.
Why? No reason!😉
In macOS 27, AppKit continues to standardize on gesture recognizers as the primary mechanism for input handling. This change directly affects Sidecar because gesture recognizers are the only way to respond to touch input from a Sidecar-connected iPad running iPadOS 27. If your app relies on tracking loops for mouse event handling, migrate to gesture recognizers to support Sidecar touch input.
This article explains how the gesture recognizer model works, how to implement gesture recognizers correctly for Sidecar touch input, how to update your existing event-handling code, and which APIs macOS 27 adds. Codebases that implement
nextEvent(matching:)ormouseDown(with:),mouseDragged(with:), andmouseUp(with:)events are most affected by the updates discussed.
After the AppKit session blindsided me a bit after telling me not to override
mouseDown, and then telling me I should overridehitTest
A few years ago, Apple introduced:
func tableView(_ tableView: NSTableView, userCanChangeVisibilityOf column: NSTableColumn) -> Boolfor
NSTableView, which Is a native way users could control-click on a TableView column to show/hide columns.This year, in #macOS27, they updated it to have a new “Reset to Defaults” option.
This is awesome bc I have done my own implementation of this feature JUST to have the option to “reset all columns” and now Apple just includes it!
Elevate your app’s text experience with TextKit:
Discover how to combine the convenience of built-in text views with the control of TextKit. We’ll show you how new APIs make it easy to extend
UITextViewandNSTextViewwith custom behaviors like line numbers and collapsible sections. We’ll also explore the TextKit architecture and walk through new caching and reuse policies for text attachments.
Previously:
- macOS Touch
- WWDC 2026 Links
- Golden Gate Menu Icons
- Golden Gate Sidebars and Toolbars
- TextKit 2: The Promised Land