List Outline View Not Using Accent Color on Disclosure Caret for visionOS

I’ve submitted the following feedback: FB13820942 (List Outline View Not Using Accent Color on Disclosure Caret for visionOS)

I’d appreciate help on this to see if I’m doing something wrong or indeed it’s the way visionOS currently works and it’s a suggested feedback.

Hey @aandyzoom01,

I'm unsure exactly the issue you are running into without a functional example. The following code applies the appropriate .foregroundColor to both the text and to the accessory view. If you are able to provide a functional example that would be great. You mention accent color, but accentcolor(_:) has been deprecated.

Thanks,

Michael

struct ContentView: View {
    let colors: [Color] = [.mint, .pink, .teal]
    @State private var selection: Color? // Nothing selected by default.


    var body: some View {
        NavigationStack {
            List(colors, id: \.self, selection: $selection) { color in
                NavigationLink(value: color) {
                    Text(color.description)
                        .foregroundStyle(.teal)
                        .padding(4)
                        .background(.black.opacity(0.5))
                }
                .foregroundStyle(color)
            }
        } 
    }
}

Thanks Michael. I appreciate your response. I did have a lab session yesterday and I talked to the engineer about this need that I have per the feedback number. They confirmed it doesn’t appear that there is an ability to do exactly what I want to do as I described in the feedback. I do understand that the accentcolor is deprecated, and the new tint Method is the new way to do things, however I could not get that to work either using foregroundStyle or any method related to tint. I’ll look at your code more and see if I’ve got other ideas based on that.

With accentcolor deprecated, what if I still have an accent color in my assets? That accent color is still being used in my app and other areas and works just fine, just not in the area. Will the accentcolor asset in my app stop working in the future? How does tint now work relative to what I already have defined as an accentcolor in my assets catalog?

List Outline View Not Using Accent Color on Disclosure Caret for visionOS
 
 
Q