'Tab bar and navigation bar color

Since upgrading to Xcode Version 13.2.1 (13C100), I've been having display issues with some of my view controllers. They look to all have the same properties, but some display with the correct colours in the tab bar and navigation bar and some do not. If it's displaying correctly and I add a view to the view controller, it stops working. I'm really baffled as to what has changed and why they're different.

enter image description here

They should look like this.

enter image description here

... but many of them (not all) now look like this, after the upgrade.

Any idea what has changed?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source