Construct and manage a graphical, event-driven user interface for your macOS app using AppKit.

AppKit Documentation

Posts under AppKit subtopic

Post

Replies

Boosts

Views

Activity

Programatic scroll edge effect for NSScrollView
Just like NSScrollView lets us programmatically set the contentInset in parallel to automaticallyAdjustsContentInsets, I think there should be similar functionality for blurring effect caused by scroll edge effect. I should be able programmatically set it. If the user is manually setting the contentInset then they can simply set a boolean, which when enabled will show edge effect when the scroll document goes outside the area of inset. Eg: scrollView.contentInsets = NSEdgeInsets(top: 100, left: 0, bottom: 0, right: 0) For contentInset like above set by user, they could set edge effect in two ways Automatically: scrollView.enableEdgeEffectOutsideInsets = true // This will apply edge effect based on frame size of contentInsets Programmatically: scrollView.edgeInsetEffectFrame = NSRect...
Topic: UI Frameworks SubTopic: AppKit
5
1
81
11m
Debugging multi-window AppKit apps: Identifying the window associated with a breakpoint
When working on a multi-window AppKit app, how do you identify which window instance is associated with the current breakpoint? The same question applies when using LLDB. If execution stops inside an object that can exist in more than one window, such as a shared NSViewController subclass, how do you know which window’s object you are currently inspecting? Does Xcode provide a mechanism for showing the NSWindow associated with the current view, view controller or responder while debugging? My current approach is to print object identities and compare them manually. For example, if several identical windows are open, I might print the current object and its window: print(self, #function) Then I interact with one window, make a note of the printed memory addresses in the console, switch to another window and compare the output. This works, but it feels manual. I am not dealing with different window subclasses. The windows may be instances of the same class and may contain instances of the same view controller classes. I simply want an easier way to distinguish which window instance I am debugging. Is there a recommended Xcode, LLDB or AppKit workflow for this?
0
0
11
8h
How to obtain an app icon regardless of current icon style?
Hey Team, Using NSWorkspace.icon(forFile:) and pointing to an app bundle, the system returns an NSImage with the icon of the app, but in the current style. For example, if the user selected tinted icons in Appearance in System Settings, then any icon I receive back from the API will be tinted using the current accent color. Is there a way to override this and get the original icon? Thanks, Ari
Topic: UI Frameworks SubTopic: AppKit
3
1
64
8h
Best practice for activating a menubar app
Hey Team, I'm developing an app that normally resides in the menu bar and has no Dock icon (activation policy set to accessory. When the user clicks the status icon, and selects 'Settings' in the menu, I change the activation policy to regular, show the window, and activate the app. Since cooperative activation was introduced, the option to ignore all apps when activating was deprecated, so I activate the app without the option. The result is that in 20% of the times, the window doesn't come to the front, or the app is not activated. The user obviously wants this behavior, so what is the proper way to achieve it? Thanks, Ari
Topic: UI Frameworks SubTopic: AppKit
4
3
54
9h
Are NSStatusItem Interactions Still Allowed?
We have a status item which works fine on macOS 26 and earlier, which has the following properties: Supports left-click to open main UI (a popover) Supports left-click (while open) to toggle (close) the main UI Supports right-click to show "app" menu (e.g. About, Quit) Supports a drop destination to accept files and folders, which then triggers the main UI for more interaction In macOS 27: left-click seems ok if we use expanded interface session, but otherwise broken left-click while open no longer toggles (event is missing?) right click is no longer operational, to the point that it seems the Menu Bar doesn't forward the event at all. Other (Apple-provided) items work fine, and expose new context menus Dragging now triggers Mission Control, which seems wrong given the destination was in the Menu Bar (FB23018381). Are these interactions now forbidden, and are there lists or documentation of the new rules? As an additional bug, it looks like popovers don't pick up appearance changes. The child scroll view claims to be in light appearance in the View Debugger, but is clearly showing the wrong background color, this is a new (as-yet unreported) issue. One last bug: expanded interface session seems to suppress the popover's animation when shown.
Topic: UI Frameworks SubTopic: AppKit Tags:
6
0
59
9h
How to achieve visual consistency between NSComboBox and NSTextView on sidebar
Do you have any ideas on how to make the background color of a NSTextView the same as the background of a NSComboBox when both are on a sidebar? The closest I could get is using a NSVisualEffectView, but it's still not optimal (the text view is slightly darker) override init(frame: NSRect) { self.scrollView = NSTextView.scrollableTextView() if #available(macOS 26.0, *) { scrollView.borderType = .lineBorder let backgroundView = NSVisualEffectView() backgroundView.material = .contentBackground backgroundView.blendingMode = .withinWindow backgroundView.state = .followsWindowActiveState backgroundView.translatesAutoresizingMaskIntoConstraints = false self.materialBackgroundView = backgroundView } else { self.materialBackgroundView = nil } ...
Topic: UI Frameworks SubTopic: AppKit
7
0
56
10h
NSTokenField - How To Tell If I'm Editing an Existing Token in -tokenField:representedObjectForEditingString: ?
I'm trying to use NSTokenField for the first time. So my custom 'representedObject' for a token has additional model data tied to it (not just the editing/display string). I noticed when I edit an existing token, type text, and hit the enter key I get the following delegate callback: - (nullable id)tokenField:(NSTokenField *)tokenField representedObjectForEditingString:(NSString *)editingString; This same delegate method is called when I type a brand new token. Is there a way to distinguish if I'm editing a token vs. creating a new one? My expectation is to be able to do something like this (made up enhancement): - (nullable id)tokenField:(NSTokenField *)tokenField representedObjectForEditingString:(NSString *)editingString atIndex:(NSUInteger)existingTokenIndex { if (existingTokenIndex == NSNotFound) { // Token is new, create a new instance MyTokenObject *newToken = //create and configure. return newToken; } else { // This would update the editing string but wouldn't discard existing data held by the token. MyTokenObject *tokenObj = [self existingTokenAtIndex:existingTokenIndex]; tokenObj.editingString = editingString; return tokenObj; } }
1
0
63
10h
Does TextKit 2 support tables and printing now?
At WWDC22, it was stated that TextKit 2 did not support tables and printing and possibly other attributes and NSTextView would revert back to TextKit 1. At what point can we be sure that TextKit 2 supports everything TextKit 1 did and NSTextView will no longer revert back. My app makes use of a subclass of NSTextView and custom layoutManager and migrating to support both versions seems incredibly complex. Thank you.
Topic: UI Frameworks SubTopic: AppKit
1
0
47
10h
Applying scroll edge effects to views outside an NSScrollView
I’m developing a text editor. In the main pane of a window managed by NSSplitViewController, I place an NSTextView enclosed in an NSScrollView alongside a custom NSView subclass that displays line numbers. The issue is that the line number view sits outside the scroll view, so it does not participate in the visual effects applied by the title bar or by an NSSplitViewItemAccessoryViewController attached to the parent view controller. This problem has existed since around macOS 26, but it appears to be more noticeable in macOS 27 Beta 1. Due to various implementation requirements, my line number view cannot be implemented as a subclass of NSRulerView. In this situation, is there any supported way to ensure that accessory view and toolbar effects are also properly applied to views that are outside the scroll view? The attached screenshot demonstrates a case where the edge effect is not applied correctly. The line number view on the left side does not participate in the effect and instead appears to visually break through it.
Topic: UI Frameworks SubTopic: AppKit
4
1
80
10h
Can I use a template image for quick actions?
Hey Team, System-provided quick actions in Finder sport a template image that adapts correctly to light and dark modes. However when I add a quick action extension in my app, the icon I refer to in the Info.plist renders in full color, even if it is defined in the asset catalog as a template image. This forces me to either use my app icon or a gray icon that will work in either appearance. How can I get the system-provided quick actions treatment? Thanks, Ari
Topic: UI Frameworks SubTopic: AppKit
1
0
30
10h
How does macOS 27 generate suggested titles for draft documents?
In macOS 27, document-based applications appear to gain a new feature where, when Autosave in Place is enabled, draft document titles are automatically suggested based on the document’s content. I was surprised to see this, but I think it is a great feature. (Interestingly, I have received similar feature requests from users of my own application in the past, but I declined them because I felt they would add unnecessary complexity.) My question is mostly out of curiosity: how is this feature implemented? My assumption is that the system may be reusing the new Spotlight indexing infrastructure to extract document content, perhaps by combining the Data returned from NSDocument.data(ofType:) during autosave with the document’s fileType. Is that understanding correct, or is a different mechanism involved? Are there any articles, WWDC sessions, or other documentation that explain this new draft title suggestion feature? I have not been able to find any information about it. Also, is there currently any way to disable this behavior? I am not personally looking to turn it off, but I suspect some users of my application may eventually ask for that option.
Topic: UI Frameworks SubTopic: AppKit
2
0
59
10h
Creating NSStatusBar.system.statusItem generates console warning
Putting: let statusItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.variableLength) at the top of AppDelegate.swift and no other code at all generates the warning below in the console when the app runs. Looks benign but it sure would be great to not have that happen. Anyone figure out how to stop this other than muting the warning? I tried all kinds of exotic deferring but that just makes the code brittle and unreadable. Here's the warning: It's not legal to call -layoutSubtreeIfNeeded on a view which is already being laid out. If you are implementing the view's -layout method, you can call -[super layout] instead. Break on void _NSDetectedLayoutRecursion(void) to debug. This will be logged only once. This may break in the future. Xcode 26.5, 26.4 - macOS 26.5.1
Topic: UI Frameworks SubTopic: AppKit
1
0
24
10h
Controlling NSSearchField appearance in sidebars and inspectors on macOS 27
First of all, thank you for updating the sidebar visuals in macOS 27! However, in macOS 27, an NSSearchField subclass placed in a sidebar or inspector appears with the same Liquid Glass button-like styling as toolbar items and other buttons. This behavior seems specific to NSSearchField; for example, a plain NSTextField does not exhibit the same appearance. While this styling may be appropriate in a toolbar, it feels out of place for a search field embedded in a sidebar or inspector. This appearance makes the search field visually indistinguishable from adjacent buttons and reduces its affordance as a text input control. Is there a supported way to control or override the appearance of an NSSearchField placed in a sidebar or inspector in macOS 27, so that it uses a more traditional search field style instead of the Liquid Glass button-like appearance? As a point of reference, Xcode 27 Beta 1 on macOS 27 Beta 1 does not appear to apply the Liquid Glass–style appearance to search fields in its sidebar. This may be because those fields are not implemented as direct subclasses of NSSearchField; however, I believe it also suggests that the Liquid Glass style is not well suited to search fields in this context.
Topic: UI Frameworks SubTopic: AppKit
4
0
64
10h
Follow-up to FB23017010: Enhancement Request component for public Spaces API + compatibility bug timeline for Monitors key removal
Received a response from Quinn @ DTS on FB23017010 regarding the com.apple.spaces plist restructure in Golden Gate. He confirmed no public Spaces API exists and suggested the plist change may be treated as a compatibility bug. He recommended filing an Enhancement Request for a proper API. Two follow-up questions for AppKit engineers: (1) Which Feedback component gets an ER for a public Spaces management API in front of the right team — AppKit, CoreOS, or Mission Control? (2) Is there any timeline visibility on the compatibility bug determination for the Monitors key removal?"
Topic: UI Frameworks SubTopic: AppKit
1
0
49
11h
AppKit NSAttributedString Document Types
Is there any documentation on the NSText* features supported by the various document types NSAttributedString can encode in AppKit? For example if I create an NSTextTable (which works fine in RTF), how can I can know if it's supported in the following types: DocFormat WordML OfficeOpenXML OpenDocument They mostly are not, and if I use merged cells (row/col spans) the support is even lower. Similarly, if I wanted to use Markdown decoding support to encode to the HTML type, does AppKit provide translation from PresentationIntent to the NSText* implementations?
Topic: UI Frameworks SubTopic: AppKit
4
0
36
11h
allowsExpansionToolTips with wrapping NSTextField capped by maximumNumberOfLines
Hi AppKit team, I'm trying to use an NSTextField in an NSTableView where the visible text wraps up to 3 lines, truncates after that, and then shows the full text in an expansion tooltip on hover. The behavior I want is: visible cell: wrapped text, capped at 3 lines hover expansion tooltip: full wrapped text I can get expansion tooltips to appear for non-wrapping text, but I haven't been able to get them to work for wrapped text capped with maximumNumberOfLines. What is the recommended way to implement expansion tooltips for a wrapping, line-capped NSTextField? Here is a minimal repro: import AppKit final class ViewController: NSViewController, NSTableViewDataSource, NSTableViewDelegate { let tableView = NSTableView() let text = String(repeating: "Very long wrapped text ", count: 40) override func viewDidLoad() { view = tableView tableView.addTableColumn(NSTableColumn()) tableView.usesAutomaticRowHeights = true tableView.dataSource = self tableView.delegate = self } func numberOfRows(in tableView: NSTableView) -> Int { 1 } func tableView(_ tableView: NSTableView, viewFor tableColumn: NSTableColumn?, row: Int) -> NSView? { let tf = NSTextField(wrappingLabelWithString: text) tf.maximumNumberOfLines = 3 tf.allowsExpansionToolTips = true tf.cell?.truncatesLastVisibleLine = true return tf } } Thank you.
Topic: UI Frameworks SubTopic: AppKit
1
0
112
11h
How to get an NSSegmentedControl in toolbar look like in the Finder?
Hey Team, In the Finder, the segmented control in the toolbar where the user can choose to display the files as icons, list, columns, or gallery, indicates its selection using a gray background. Is that done via custom drawing or is it a semantic option in AppKit? When I adopt Liquid Glass in my app by removing UIDesignRequiresCompatibility, my segmented control indicates the selections with a strong accent color. This could be distracting to my users and I'd like to duplicate the Finder behavior. Thanks, Ari
Topic: UI Frameworks SubTopic: AppKit
2
0
51
11h
Programatic scroll edge effect for NSScrollView
Just like NSScrollView lets us programmatically set the contentInset in parallel to automaticallyAdjustsContentInsets, I think there should be similar functionality for blurring effect caused by scroll edge effect. I should be able programmatically set it. If the user is manually setting the contentInset then they can simply set a boolean, which when enabled will show edge effect when the scroll document goes outside the area of inset. Eg: scrollView.contentInsets = NSEdgeInsets(top: 100, left: 0, bottom: 0, right: 0) For contentInset like above set by user, they could set edge effect in two ways Automatically: scrollView.enableEdgeEffectOutsideInsets = true // This will apply edge effect based on frame size of contentInsets Programmatically: scrollView.edgeInsetEffectFrame = NSRect...
Topic: UI Frameworks SubTopic: AppKit
Replies
5
Boosts
1
Views
81
Activity
11m
Debugging multi-window AppKit apps: Identifying the window associated with a breakpoint
When working on a multi-window AppKit app, how do you identify which window instance is associated with the current breakpoint? The same question applies when using LLDB. If execution stops inside an object that can exist in more than one window, such as a shared NSViewController subclass, how do you know which window’s object you are currently inspecting? Does Xcode provide a mechanism for showing the NSWindow associated with the current view, view controller or responder while debugging? My current approach is to print object identities and compare them manually. For example, if several identical windows are open, I might print the current object and its window: print(self, #function) Then I interact with one window, make a note of the printed memory addresses in the console, switch to another window and compare the output. This works, but it feels manual. I am not dealing with different window subclasses. The windows may be instances of the same class and may contain instances of the same view controller classes. I simply want an easier way to distinguish which window instance I am debugging. Is there a recommended Xcode, LLDB or AppKit workflow for this?
Replies
0
Boosts
0
Views
11
Activity
8h
How to obtain an app icon regardless of current icon style?
Hey Team, Using NSWorkspace.icon(forFile:) and pointing to an app bundle, the system returns an NSImage with the icon of the app, but in the current style. For example, if the user selected tinted icons in Appearance in System Settings, then any icon I receive back from the API will be tinted using the current accent color. Is there a way to override this and get the original icon? Thanks, Ari
Topic: UI Frameworks SubTopic: AppKit
Replies
3
Boosts
1
Views
64
Activity
8h
Best practice for activating a menubar app
Hey Team, I'm developing an app that normally resides in the menu bar and has no Dock icon (activation policy set to accessory. When the user clicks the status icon, and selects 'Settings' in the menu, I change the activation policy to regular, show the window, and activate the app. Since cooperative activation was introduced, the option to ignore all apps when activating was deprecated, so I activate the app without the option. The result is that in 20% of the times, the window doesn't come to the front, or the app is not activated. The user obviously wants this behavior, so what is the proper way to achieve it? Thanks, Ari
Topic: UI Frameworks SubTopic: AppKit
Replies
4
Boosts
3
Views
54
Activity
9h
Are NSStatusItem Interactions Still Allowed?
We have a status item which works fine on macOS 26 and earlier, which has the following properties: Supports left-click to open main UI (a popover) Supports left-click (while open) to toggle (close) the main UI Supports right-click to show "app" menu (e.g. About, Quit) Supports a drop destination to accept files and folders, which then triggers the main UI for more interaction In macOS 27: left-click seems ok if we use expanded interface session, but otherwise broken left-click while open no longer toggles (event is missing?) right click is no longer operational, to the point that it seems the Menu Bar doesn't forward the event at all. Other (Apple-provided) items work fine, and expose new context menus Dragging now triggers Mission Control, which seems wrong given the destination was in the Menu Bar (FB23018381). Are these interactions now forbidden, and are there lists or documentation of the new rules? As an additional bug, it looks like popovers don't pick up appearance changes. The child scroll view claims to be in light appearance in the View Debugger, but is clearly showing the wrong background color, this is a new (as-yet unreported) issue. One last bug: expanded interface session seems to suppress the popover's animation when shown.
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
6
Boosts
0
Views
59
Activity
9h
How to achieve visual consistency between NSComboBox and NSTextView on sidebar
Do you have any ideas on how to make the background color of a NSTextView the same as the background of a NSComboBox when both are on a sidebar? The closest I could get is using a NSVisualEffectView, but it's still not optimal (the text view is slightly darker) override init(frame: NSRect) { self.scrollView = NSTextView.scrollableTextView() if #available(macOS 26.0, *) { scrollView.borderType = .lineBorder let backgroundView = NSVisualEffectView() backgroundView.material = .contentBackground backgroundView.blendingMode = .withinWindow backgroundView.state = .followsWindowActiveState backgroundView.translatesAutoresizingMaskIntoConstraints = false self.materialBackgroundView = backgroundView } else { self.materialBackgroundView = nil } ...
Topic: UI Frameworks SubTopic: AppKit
Replies
7
Boosts
0
Views
56
Activity
10h
NSTokenField - How To Tell If I'm Editing an Existing Token in -tokenField:representedObjectForEditingString: ?
I'm trying to use NSTokenField for the first time. So my custom 'representedObject' for a token has additional model data tied to it (not just the editing/display string). I noticed when I edit an existing token, type text, and hit the enter key I get the following delegate callback: - (nullable id)tokenField:(NSTokenField *)tokenField representedObjectForEditingString:(NSString *)editingString; This same delegate method is called when I type a brand new token. Is there a way to distinguish if I'm editing a token vs. creating a new one? My expectation is to be able to do something like this (made up enhancement): - (nullable id)tokenField:(NSTokenField *)tokenField representedObjectForEditingString:(NSString *)editingString atIndex:(NSUInteger)existingTokenIndex { if (existingTokenIndex == NSNotFound) { // Token is new, create a new instance MyTokenObject *newToken = //create and configure. return newToken; } else { // This would update the editing string but wouldn't discard existing data held by the token. MyTokenObject *tokenObj = [self existingTokenAtIndex:existingTokenIndex]; tokenObj.editingString = editingString; return tokenObj; } }
Replies
1
Boosts
0
Views
63
Activity
10h
Is there an AppKit equivalent to UIKit.UIApplication setAlternateIconName(_ alternateIconName: String?)?
I would like to provide alternate IconComposer-designed icons (that support light, dark, mono) for my macOS app. The DockTile approach only works when app is running, but also only with NSImage. And there doesn't seem to be a way to load an NSImage from a .icon file that matches the current appearance option. Thank you.
Topic: UI Frameworks SubTopic: AppKit
Replies
2
Boosts
1
Views
66
Activity
10h
Does TextKit 2 support tables and printing now?
At WWDC22, it was stated that TextKit 2 did not support tables and printing and possibly other attributes and NSTextView would revert back to TextKit 1. At what point can we be sure that TextKit 2 supports everything TextKit 1 did and NSTextView will no longer revert back. My app makes use of a subclass of NSTextView and custom layoutManager and migrating to support both versions seems incredibly complex. Thank you.
Topic: UI Frameworks SubTopic: AppKit
Replies
1
Boosts
0
Views
47
Activity
10h
Applying scroll edge effects to views outside an NSScrollView
I’m developing a text editor. In the main pane of a window managed by NSSplitViewController, I place an NSTextView enclosed in an NSScrollView alongside a custom NSView subclass that displays line numbers. The issue is that the line number view sits outside the scroll view, so it does not participate in the visual effects applied by the title bar or by an NSSplitViewItemAccessoryViewController attached to the parent view controller. This problem has existed since around macOS 26, but it appears to be more noticeable in macOS 27 Beta 1. Due to various implementation requirements, my line number view cannot be implemented as a subclass of NSRulerView. In this situation, is there any supported way to ensure that accessory view and toolbar effects are also properly applied to views that are outside the scroll view? The attached screenshot demonstrates a case where the edge effect is not applied correctly. The line number view on the left side does not participate in the effect and instead appears to visually break through it.
Topic: UI Frameworks SubTopic: AppKit
Replies
4
Boosts
1
Views
80
Activity
10h
Can I use a template image for quick actions?
Hey Team, System-provided quick actions in Finder sport a template image that adapts correctly to light and dark modes. However when I add a quick action extension in my app, the icon I refer to in the Info.plist renders in full color, even if it is defined in the asset catalog as a template image. This forces me to either use my app icon or a gray icon that will work in either appearance. How can I get the system-provided quick actions treatment? Thanks, Ari
Topic: UI Frameworks SubTopic: AppKit
Replies
1
Boosts
0
Views
30
Activity
10h
Remove MacOS Tahoe Sidebar + Inspector Chrome
Is it possible to remove the ugly sidebar and inspector chrome with AppKit? I don't care if it's a hack or a swizzle or something, but I need to get rid of this. I want to convert this: Into this (photoshopped): Thanks for your help!
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
1
Boosts
1
Views
369
Activity
10h
How does macOS 27 generate suggested titles for draft documents?
In macOS 27, document-based applications appear to gain a new feature where, when Autosave in Place is enabled, draft document titles are automatically suggested based on the document’s content. I was surprised to see this, but I think it is a great feature. (Interestingly, I have received similar feature requests from users of my own application in the past, but I declined them because I felt they would add unnecessary complexity.) My question is mostly out of curiosity: how is this feature implemented? My assumption is that the system may be reusing the new Spotlight indexing infrastructure to extract document content, perhaps by combining the Data returned from NSDocument.data(ofType:) during autosave with the document’s fileType. Is that understanding correct, or is a different mechanism involved? Are there any articles, WWDC sessions, or other documentation that explain this new draft title suggestion feature? I have not been able to find any information about it. Also, is there currently any way to disable this behavior? I am not personally looking to turn it off, but I suspect some users of my application may eventually ask for that option.
Topic: UI Frameworks SubTopic: AppKit
Replies
2
Boosts
0
Views
59
Activity
10h
Creating NSStatusBar.system.statusItem generates console warning
Putting: let statusItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.variableLength) at the top of AppDelegate.swift and no other code at all generates the warning below in the console when the app runs. Looks benign but it sure would be great to not have that happen. Anyone figure out how to stop this other than muting the warning? I tried all kinds of exotic deferring but that just makes the code brittle and unreadable. Here's the warning: It's not legal to call -layoutSubtreeIfNeeded on a view which is already being laid out. If you are implementing the view's -layout method, you can call -[super layout] instead. Break on void _NSDetectedLayoutRecursion(void) to debug. This will be logged only once. This may break in the future. Xcode 26.5, 26.4 - macOS 26.5.1
Topic: UI Frameworks SubTopic: AppKit
Replies
1
Boosts
0
Views
24
Activity
10h
Controlling NSSearchField appearance in sidebars and inspectors on macOS 27
First of all, thank you for updating the sidebar visuals in macOS 27! However, in macOS 27, an NSSearchField subclass placed in a sidebar or inspector appears with the same Liquid Glass button-like styling as toolbar items and other buttons. This behavior seems specific to NSSearchField; for example, a plain NSTextField does not exhibit the same appearance. While this styling may be appropriate in a toolbar, it feels out of place for a search field embedded in a sidebar or inspector. This appearance makes the search field visually indistinguishable from adjacent buttons and reduces its affordance as a text input control. Is there a supported way to control or override the appearance of an NSSearchField placed in a sidebar or inspector in macOS 27, so that it uses a more traditional search field style instead of the Liquid Glass button-like appearance? As a point of reference, Xcode 27 Beta 1 on macOS 27 Beta 1 does not appear to apply the Liquid Glass–style appearance to search fields in its sidebar. This may be because those fields are not implemented as direct subclasses of NSSearchField; however, I believe it also suggests that the Liquid Glass style is not well suited to search fields in this context.
Topic: UI Frameworks SubTopic: AppKit
Replies
4
Boosts
0
Views
64
Activity
10h
Is it a bug that the title of the toolbar item isn't displaying? (macOS 27.0 beta)
Is it a bug that when I return toolbarSelectableItemIdentifiers in the NSToolbar delegate, the toolbar title no longer displays and the Liquid Glass effect also appears distorted? *This code worked fine up to macOS 26.
Topic: UI Frameworks SubTopic: AppKit
Replies
7
Boosts
0
Views
87
Activity
11h
Follow-up to FB23017010: Enhancement Request component for public Spaces API + compatibility bug timeline for Monitors key removal
Received a response from Quinn @ DTS on FB23017010 regarding the com.apple.spaces plist restructure in Golden Gate. He confirmed no public Spaces API exists and suggested the plist change may be treated as a compatibility bug. He recommended filing an Enhancement Request for a proper API. Two follow-up questions for AppKit engineers: (1) Which Feedback component gets an ER for a public Spaces management API in front of the right team — AppKit, CoreOS, or Mission Control? (2) Is there any timeline visibility on the compatibility bug determination for the Monitors key removal?"
Topic: UI Frameworks SubTopic: AppKit
Replies
1
Boosts
0
Views
49
Activity
11h
AppKit NSAttributedString Document Types
Is there any documentation on the NSText* features supported by the various document types NSAttributedString can encode in AppKit? For example if I create an NSTextTable (which works fine in RTF), how can I can know if it's supported in the following types: DocFormat WordML OfficeOpenXML OpenDocument They mostly are not, and if I use merged cells (row/col spans) the support is even lower. Similarly, if I wanted to use Markdown decoding support to encode to the HTML type, does AppKit provide translation from PresentationIntent to the NSText* implementations?
Topic: UI Frameworks SubTopic: AppKit
Replies
4
Boosts
0
Views
36
Activity
11h
allowsExpansionToolTips with wrapping NSTextField capped by maximumNumberOfLines
Hi AppKit team, I'm trying to use an NSTextField in an NSTableView where the visible text wraps up to 3 lines, truncates after that, and then shows the full text in an expansion tooltip on hover. The behavior I want is: visible cell: wrapped text, capped at 3 lines hover expansion tooltip: full wrapped text I can get expansion tooltips to appear for non-wrapping text, but I haven't been able to get them to work for wrapped text capped with maximumNumberOfLines. What is the recommended way to implement expansion tooltips for a wrapping, line-capped NSTextField? Here is a minimal repro: import AppKit final class ViewController: NSViewController, NSTableViewDataSource, NSTableViewDelegate { let tableView = NSTableView() let text = String(repeating: "Very long wrapped text ", count: 40) override func viewDidLoad() { view = tableView tableView.addTableColumn(NSTableColumn()) tableView.usesAutomaticRowHeights = true tableView.dataSource = self tableView.delegate = self } func numberOfRows(in tableView: NSTableView) -> Int { 1 } func tableView(_ tableView: NSTableView, viewFor tableColumn: NSTableColumn?, row: Int) -> NSView? { let tf = NSTextField(wrappingLabelWithString: text) tf.maximumNumberOfLines = 3 tf.allowsExpansionToolTips = true tf.cell?.truncatesLastVisibleLine = true return tf } } Thank you.
Topic: UI Frameworks SubTopic: AppKit
Replies
1
Boosts
0
Views
112
Activity
11h
How to get an NSSegmentedControl in toolbar look like in the Finder?
Hey Team, In the Finder, the segmented control in the toolbar where the user can choose to display the files as icons, list, columns, or gallery, indicates its selection using a gray background. Is that done via custom drawing or is it a semantic option in AppKit? When I adopt Liquid Glass in my app by removing UIDesignRequiresCompatibility, my segmented control indicates the selections with a strong accent color. This could be distracting to my users and I'd like to duplicate the Finder behavior. Thanks, Ari
Topic: UI Frameworks SubTopic: AppKit
Replies
2
Boosts
0
Views
51
Activity
11h