reports icon indicating copy to clipboard operation
reports copied to clipboard

FB11381682: `.toolbarColorScheme` is applied too broadly

Open PhilipTrauner opened this issue 2 years ago • 1 comments

  • 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

Toolbar Color Scheme.zip

PhilipTrauner avatar Aug 26 '22 20:08 PhilipTrauner

iOS 16.1 beta 1 workaround:

RootView()
    .tint(Color(uiColor: .label))

PhilipTrauner avatar Sep 14 '22 19:09 PhilipTrauner