I am using the .searchable() modifier on a NavigationStack. I want to change the color of the cancel button as it does not match with my app colors. How can I do this?
This is what I already tried without luck: accentcolor, tint, foregroundcolor, background change following the .searchable() adding dark theme with .preferredColorScheme(.dark) following .searchable (only changes the color of the textbar adding UINavigationBar.appearance().tintColor = .white or UISearchBar.appearance().overrideUserInterfaceStyle = .dark to the init of the app
I thought about creating a Zstack to make a box with my own text to cover the cancel button but this sounds like a lot of work as the cancel button moves with animation when the textfield is clicked. And it will vary depending on device orientation and type of device.
Any advice would be helpful!