iosuinavigationbarios13uiappearance

iOS 13 navigation bar styling: huge differences between device and simulator


I am styling my iOS app with this bit of code:

window.tintColor = .black

// Completely white navbar
UINavigationBar.appearance().barStyle = .default
UINavigationBar.appearance().isTranslucent = false
UINavigationBar.appearance().shadowImage = UIImage()

// White tabbar
UITabBar.appearance().barStyle = .default
UITabBar.appearance().isTranslucent = false

This all works and looks fine on the iOS 13.0 simulator, as expected:

simulator

However, when I run this on my actual iPhone X, it looks like this:

device

I'm using Xcode 11.0 from the App Store (11A420a), but my device is running iOS 13.1, latest developer beta.

I don't have another device running non-beta iOS 13.0, so I don't know if this problem is only related to iOS 13.1 or if it would also happen on the device on 13.0. What has changed in iOS 13.0 or .1 with regards to the tint colors that could explain this?

I have a minimal project at https://github.com/kevinrenskers/iOS13tint that shows the problem. Looks normal on iOS 13.0 on the simulator, but not okay on device (iOS 13.0).


Solution

  • They behave identically on simulator and device. In your testing, however, it happens that the device is in Dark Mode but the simulator isn't! Just make sure that both the simulator and the device have the same mode (dark or light) and you will see the same thing on both.