ios 26的tabbar 背景透明

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

}

相关推荐
全堆鸿蒙1 天前
25 数据库设计与表结构规划:5 张表的设计思路
数据库·华为·cocoa·harmonyos
colman wang2 天前
Git指令(Mac)
git·macos
酷虎软件2 天前
分享链接+视频音频文案提取 API 接口文档
ide·macos·xcode
Hyyy3 天前
为什么 macOS 应用一换 Bundle ID,之前授予的权限就全失效了?
macos·electron
p似笑非笑3 天前
实战验证——把 SDK 塞进一个 macOS 原生 Agent 应用
macos
p似笑非笑3 天前
在Mac上完美配置VSCode的C/C++开发环境(GCC/G++详细教程)
c语言·vscode·macos
韦胖漫谈IT3 天前
Apple M3 Max 与 Apple M5 Max 对比:本地算力的新旧王者之争
网络·人工智能·macos·transformer
greasyfork4 天前
多种数据库管理混乱?Navicat Premium 17 for Mac 统一解决
数据库·mysql·macos·mac
碎_浪4 天前
Mac 壁纸被 MDM 锁住?我做了个 2MB 的开源方案
macos·开源·swift
逆向编程4 天前
AI编程CLI两种配置方案(macOS专用)
macos·ai编程