Thursday, June 18, 2026

AppKit in macOS 27

macOS Golden Gate 27 Beta Release Notes:

AppKit adds NSRefreshController, providing pull-to-refresh functionality for NSScrollView.

[…]

NSToolbarItemGroup adds the role property and the NSToolbarItemGroupRole enum, allowing toolbar item groups to be tagged with a semantic role. NSSegmentedControl similarly adds a role property and the NSSegmentedControlRole enum, including a tabs role for controls that represent tab-based navigation and content selection.

[…]

NSTextSelectionManager provides common text selection interactions (click, drag, shift-click, double/triple-click word/line/paragraph selection) to a NSView with a set of NSGestureRecognizers rather than overriding NSEvent mouse methods. NSTextView now uses NSTextSelectionManager and provides its own set of NSGestureRecognizers to provide additional features in addition to text selection.

[…]

By default, NSMenu hides all menu item symbol images — non-symbol images remain visible. […] Use the new preferredImageVisibility property on NSMenuItem to customize the image visibility for your menu items. As in macOS 26.0, NSMenu automatically provides default visible menu item images for certain common system-wide menu items, such as Settings, Share, and Print.

AppKit updates:

Create events similar to UIControl events on NSControl with the new NSControl.Events type.

[…]

Initiate a drag operation from a gesture recognizer using the new beginDraggingSession(items:gesture:source:) method on NSView.

[…]

Update views automatically in response to Observable model changes using the guidance in Updating views automatically with observation tracking.

How is this different from what was announced last year?

Modernize your AppKit app:

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.

Steve Troughton-Smith:

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!😉

TN3212:

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:) or mouseDown(with:), mouseDragged(with:), and mouseUp(with:) events are most affected by the updates discussed.

Greg Pierce:

After the AppKit session blindsided me a bit after telling me not to override mouseDown, and then telling me I should override hitTest

Mario Guzmán:

A few years ago, Apple introduced:

func tableView(_ tableView: NSTableView, userCanChangeVisibilityOf column: NSTableColumn) -> Bool

for 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 UITextView and NSTextView with 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:

Comments RSS · Twitter · Mastodon

Leave a Comment