if #available(iOS 13.0, *){
let appearance = UITabBarAppearance()
appearance.configureWithTransparentBackground()
// 移除阴影和边框
appearance.shadowColor = .clear
appearance.shadowImage = UIImage()
appearance.backgroundImage = UIImage()
// 设置标准外观
tabBar.standardAppearance = appearance
// iOS 15 需要设置 scrollEdgeAppearance
if #available(iOS 15.0, *) {
tabBar.scrollEdgeAppearance = appearance
}
appearance.backgroundImage = UIImage()
appearance.shadowImage = UIImage()
appearance.backgroundColor = .clear
tabBar.standardAppearance = appearance
}else{
tabBar.isTranslucent = true
tabBar.backgroundColor = .clear
}