1
1
导航栏与ViewController中的不同之处在于,导航栏是半透明的,系统将为导航栏应用默认的alpha值。
或手动: 导航栏和ViewController背景颜色的差异为20。这使UINavigationBar具有“光泽”外观,因此具有内置样式。 因此,R=104 | G=154 | B=26将变为R=84 | G=134 B | B=6。
|
2
1
有两种方法: 1) 将导航栏设置为非半透明:
2) 设置导航栏的背景图像:
您还可以使用以下函数提供基于UIColor生成的UIImage:
|
sandpat · 使导航堆栈中只有一个导航栏透明iOS Swift 6 年前 |
Witterquick · 刷新导航栏背景色 6 年前 |
user8902111 · 导航控制器按钮问题 6 年前 |
COLD ICE · 使用彩色导航栏时,搜索栏中会出现白线 6 年前 |