UINavigationController设置透明背景
文章目录
self.navBar = [[UINavigationBar alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, NAV_BAR_HEIGHT)]; [self.navBar setBackgroundImage:[UIImage imageWithColor:[UIColor clearColor]] forBarMetrics:UIBarMetricsDefault]; [self.navBar setBackgroundColor:UIColorFromRGBA(0xFF1E1E1E)]; self.navBar.shadowImage = [[UIImage alloc] init];
使用UIImage+Color2Image.h将透明色值转换为图片, 设置shadowImage去掉底部line
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册⭐️ Admin快速开发: https://show.cool-admin.com/
赞 0⭐️ 官方文档: https://cool-js.com
赞 0⭐️ chatgpt在线体验: https://cool-js.com/ai/chat-vip/index.html?r=helloworld
赞 0