NEW: Subscribe to Hacking with Swift+ and accelerate your learning! >>

How do I get sidebar icons to use the accent color?

Forums > SwiftUI

For an iPad app I am developing I have created a sidebar. Although the sidebar is visible and uses the specified accent color when selecting an item in the list, it fails to display the icons in the accent color. See attached code below. Does anyone have an idea what I am missing here?

(Xcode 12.2 Beta 3)

        List(selection: $selection) {
                destination: HomeView()) {
                Label("Home", systemImage: "house.fill")

                destination: TimelineView()) {
                Label("Timeline", systemImage: "calendar")

            // More of the same...

        .navigationTitle("Sidebar Menu")


Hacking with Swift is sponsored by Fernando Olivares

SPONSORED Ever ask for help and your reviewer immediately notices issues you missed? Fernando Olivares is a 10-year veteran from Big Nerd Ranch and Lambda School who can help hone your app building skills, and he's just launched a new book that does just that – use the code "hacking" to save $5!

Buy the book

Sponsor Hacking with Swift and reach the world's largest Swift community!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

Unknown user

Not logged in

Log in

Link copied to your pasteboard.