将阴影添加到导航栏iOS 15
我正在尝试将阴影应用于导航栏,但我所有的尝试都失败了。 有效的解决方案,但是它在iOS 15上不起作用
。
navigationController?.navigationBar.layer.shadowColor = UIColor.baseGray.cgColor
navigationController?.navigationBar.layer.shadowOffset = CGSize(width: 0.0, height: 2.0)
navigationController?.navigationBar.layer.shadowRadius = 10.0
navigationController?.navigationBar.layer.shadowOpacity = 0.25
navigationController?.navigationBar.layer.masksToBounds = false
我找到了一个 xshh6ww“ rel =” nofollow noreferrer”> https://ibb.co/xshh6ww
I'm trying to apply a shadow to the navigation bar, but all my attempts have failed. I found a working solution, but it does not work on ios 15.... Can anyone solve a similar problem and share a working solution
It does not work on ios 15:
navigationController?.navigationBar.layer.shadowColor = UIColor.baseGray.cgColor
navigationController?.navigationBar.layer.shadowOffset = CGSize(width: 0.0, height: 2.0)
navigationController?.navigationBar.layer.shadowRadius = 10.0
navigationController?.navigationBar.layer.shadowOpacity = 0.25
navigationController?.navigationBar.layer.masksToBounds = false
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我找到了一个解决方案,也许有人会发现它有用
I found a solution, maybe someone will find it useful