scrollview界面显示了透明tabbar处理
更新了iOS15之后,页面的tabbar显示透明了,切换下又正常,尤其是滚动到底部的时候,本来设置了背景图的,又变成透明样式的了。
又是iOS15之后的新属性没有适配,兼容处理下就能正常显示了。
if(@available(iOS 15.0, *)) {
UITabBarAppearance *apperarance = [[UITabBarAppearance alloc] init];
[apperarance configureWithOpaqueBackground];
apperarance.backgroundImage = [UIImage imageWithColor1x1_au:kColor_white];
self.rootVC.tabBar.standardAppearance = apperarance;
self.rootVC.tabBar.scrollEdgeAppearance = apperarance;
}