I am assigning a custom color from my Colors.xcassets (that has two color values, one for light, one for dark mode) to my navigation bar using this method:
[self.navigationController.navigationBar setBarTintColor: ...;
.
For some reason the navigation bar only takes the color value for the dark mode, even when the application launches in, or switches to light mode. It always uses the darker blue tint:
When I set this color to other objects, it works just as it should work. As I found no thread describing this problem, I am quite clueless about how I can solve this. It happens in both, iOS13 and iOS14.
Thanks in advance,
Bastian
Create two colors, say
navTint
andnavBack
and set them as follows. Note I set them to the navigationbar as well as the toolbar.