当我设置UITabBar的背景色时,iOS会自动淡化这个颜色,因为默认的UITabBar是半透明的。
但是我想使用UITabBar,它是,而不是半透明的。在iOS 12及以下版本中,我通过设置所需颜色的背景图像来解决这个问题:
// Create an image from a given color using a custom extension
[[UITabBar appearance] setBackgroundImage:[UIImage colorImageWithColor:[UIColor redColor]]];
,这个工作很好,。然而,我想在iOS 13中使用新的黑暗模式