Post

Replies

Boosts

Views

Activity

macOS 27 SwiftUI toolbar flicker during sidebar animation: a background workaround
While testing a native SwiftUI app on macOS 27.0 beta (26A5421a), built with Xcode 27.0 beta (27A5209h), we observed toolbar button groups briefly dimming when a custom sidebar animated open or closed. Filed as FB24782376. Our layout uses an HStack with a .bar sidebar background, animated sidebar width/offset, scrollable detail content, and a persistent root toolbar. The toolbar includes sidebar/add and play/edit/delete groups plus a separate terminal button. The change that removed the measured transition in this app was: .toolbar { // Existing toolbar items } .toolbarBackgroundVisibility(.hidden, for: .windowToolbar) This hides the automatic full-width toolbar backdrop. In our configuration, the standard native glass backgrounds around toolbar buttons remain. It changes the toolbar background design, so test it against your own content, appearance settings, and supported macOS versions. What we measured Read-only NSView/CALayer instrumentation showed a toolbar-wide hosting layer receiving a CATransition of type fade, lasting 0.25 seconds. Toolbar items stayed enabled, button instances stayed stable, and individual view/presentation-layer opacity remained 1. A keyboard-triggered comparison also kept the app/window active, key, and main throughout. Forcing the background visible, restricting the sidebar material’s safe-area extent, and isolating sidebar state below the toolbar-owning view did not remove the transition. Hiding the automatic toolbar background did. With standard SwiftUI buttons and the original layout restored, the hidden-background version recorded no toolbar animations on both opening and closing (91 samples per transition). These are app-side samples, not pixel-by-pixel proof or an independent minimal reproduction. This is a tested workaround for our configuration and a suspected system rendering interaction, not an Apple-confirmed diagnosis or a universal fix for toolbar flicker. We have not established behavior on other macOS versions. Related reports, not confirmed duplicates Toolbar jitter when toggling a sidebar (2022): intermittent movement of a share button during sidebar toggles, with another developer reporting similar behavior. Toolbar flashes above a translucent sidebar (2021): brief white flashes during periodic updates in full screen. Both predate this macOS 27 observation and have different triggers or appearances. They do not establish the same root cause. API reference: Apple’s toolbarBackgroundVisibility documentation. If you see a similar brief dimming on this configuration, comparing automatic versus hidden toolbar background visibility may help narrow it down. Please include your OS build, layout, and whether the comparison changes the symptom when filing feedback.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
0
0
232
1d
macOS 27 SwiftUI toolbar flicker during sidebar animation: a background workaround
While testing a native SwiftUI app on macOS 27.0 beta (26A5421a), built with Xcode 27.0 beta (27A5209h), we observed toolbar button groups briefly dimming when a custom sidebar animated open or closed. Filed as FB24782376. Our layout uses an HStack with a .bar sidebar background, animated sidebar width/offset, scrollable detail content, and a persistent root toolbar. The toolbar includes sidebar/add and play/edit/delete groups plus a separate terminal button. The change that removed the measured transition in this app was: .toolbar { // Existing toolbar items } .toolbarBackgroundVisibility(.hidden, for: .windowToolbar) This hides the automatic full-width toolbar backdrop. In our configuration, the standard native glass backgrounds around toolbar buttons remain. It changes the toolbar background design, so test it against your own content, appearance settings, and supported macOS versions. What we measured Read-only NSView/CALayer instrumentation showed a toolbar-wide hosting layer receiving a CATransition of type fade, lasting 0.25 seconds. Toolbar items stayed enabled, button instances stayed stable, and individual view/presentation-layer opacity remained 1. A keyboard-triggered comparison also kept the app/window active, key, and main throughout. Forcing the background visible, restricting the sidebar material’s safe-area extent, and isolating sidebar state below the toolbar-owning view did not remove the transition. Hiding the automatic toolbar background did. With standard SwiftUI buttons and the original layout restored, the hidden-background version recorded no toolbar animations on both opening and closing (91 samples per transition). These are app-side samples, not pixel-by-pixel proof or an independent minimal reproduction. This is a tested workaround for our configuration and a suspected system rendering interaction, not an Apple-confirmed diagnosis or a universal fix for toolbar flicker. We have not established behavior on other macOS versions. Related reports, not confirmed duplicates Toolbar jitter when toggling a sidebar (2022): intermittent movement of a share button during sidebar toggles, with another developer reporting similar behavior. Toolbar flashes above a translucent sidebar (2021): brief white flashes during periodic updates in full screen. Both predate this macOS 27 observation and have different triggers or appearances. They do not establish the same root cause. API reference: Apple’s toolbarBackgroundVisibility documentation. If you see a similar brief dimming on this configuration, comparing automatic versus hidden toolbar background visibility may help narrow it down. Please include your OS build, layout, and whether the comparison changes the symptom when filing feedback.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
0
Boosts
0
Views
232
Activity
1d