reports
reports copied to clipboard
FB11381682: `.toolbarColorScheme` is applied too broadly
- Date: 2022-08-26
- Resolution: Open
- Area: SwiftUI Framework
- OS: iOS & iPadOS
- Type: Incorrect/Unexpected Behavior
Description
Xcode: 14.0 beta 6 (14A5294g) iOS: 16.0 Beta 7
The color scheme provided in .toolbarColorScheme(_ colorScheme: ColorScheme?, for bars: ToolbarPlacement...)
is applied more broadly than expected.
Expected: Provided color scheme should only be applied for provided bar (e.g. .navigationBar
)
Actual: Color scheme is applied to Button
labels regardless of placement, and tab bar
Depending on the chosen AccentColor
this can lead to invisible buttons.
Demonstration included in attached screen recording.
Files
https://user-images.githubusercontent.com/9287847/186988835-77a89e63-fbef-468e-b6f1-5c8c25430762.mp4
iOS 16.1 beta 1 workaround:
RootView()
.tint(Color(uiColor: .label))