You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Keywords: SwiftUI ShapeStyle, “Designed for iPad” compatibility mode Mac apps
Description
When using SwiftUI's SeparatorShapeStyle in an iPad app running on Mac through iPad compatibility mode, the separator style incorrectly inherits the view's foregroundStyle color instead of maintaining its standard translucent gray appearance.
Steps to Reproduce:
Create a shape and fill it with .fill(.separator)
Set a foregroundStyle on a parent container view
Run the app on iPad/iPhone - appears correct
Run the same iPad app on Mac - separator incorrectly takes on the foreground color
Expected Behavior:
The SeparatorShapeStyle should maintain its standard translucent gray appearance regardless of the parent view's foregroundStyle, consistent with its behavior on iPadOS.
Note: This does not happen with other fill styles, such as .fill(.fill). Both systems will correctly render it as gray.
Files
//// ContentView.swift// CanvasStyleTest//// Created by Sam Gold on 2024-11-14.//
import SwiftUI
structContentView:View{varbody:someView{HStack(spacing:64){Circle().fill(.separator).frame(width:128, height:128)Circle().frame(width:128, height:128)}.foregroundStyle(.blue)}}
#Preview {ContentView()}
The text was updated successfully, but these errors were encountered:
Description
When using SwiftUI's SeparatorShapeStyle in an iPad app running on Mac through iPad compatibility mode, the separator style incorrectly inherits the view's foregroundStyle color instead of maintaining its standard translucent gray appearance.
Steps to Reproduce:
.fill(.separator)
Expected Behavior:
The SeparatorShapeStyle should maintain its standard translucent gray appearance regardless of the parent view's foregroundStyle, consistent with its behavior on iPadOS.
Note: This does not happen with other fill styles, such as
.fill(.fill)
. Both systems will correctly render it as gray.Files
The text was updated successfully, but these errors were encountered: