我正在设置自定义后退按钮图片,但我很难找到导航栏从图像中删除阴影的原因
override func viewDidLoad() {
super.viewDidLoad()
navigationController?.navigationBar.barStyle = .black
let transparentPixel = UIImage()
navigationController?.navigationBar.setBackgroundImage(transparentPixel, for: UIBarMetrics.default)
navigationController?.navigationBar.backgroundColor = .clear
navigationController?.navigationBar.isTranslucent = true
navigationController?.navigationBar.backIndicatorImage = #imageLiteral(resourceName: "arrowBackShadow")
navigationController?.navigationBar.backIndicatorTransitionMaskImage = #imageLiteral(resourceName: "arrowBackShadow")
navigationController?.navigationBar.barTintColor = .white
navigationController?.navigationBar.tintColor = .white
}