UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

why is back button special wrt accentColor?

Forums > SwiftUI

not sure this is the right forum for this question, please forgive me if its not..

its very cool how there are many different ways to control how views render themselves and what colors come into play in very rich and yet very well thought out systematic ways. takes reasonably little effort to achieve quite a bit in terms of creating quality user experience.

one method in particular that comes in handy (at least for me) is setting an accentColor() for a root view or (more to the point of this question) the navigation bar. and that works very well for setting a general theme for a section of an app.

works very nicely except for one little bugger, the navigation view's (or stack's) back button.

its accent color can, indeed, be managed in the Assets/AccentColor file and there is a handful of other workarounds but my real question is what makes that button special? why not play nice like all other toolbar items do?

any insight would be greatly appreciated and will indeed restore my sleep :)

1      

Hacking with Swift is sponsored by RevenueCat

SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure your entire paywall view without any code changes or app updates.

Learn more here

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

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.