을 도움이되기를 바랍니다!
문제는이 기능을이었다
extension UINavigationController{
func applyWhiteEffect(){
var bounds = self.navigationBar.bounds
let whiteView = UIView()
bounds.origin.y = -20
bounds.size.height = bounds.size.height + 20
whiteView.frame = bounds
whiteView.autoresizingMask = [.FlexibleWidth, .FlexibleHeight]
whiteView.userInteractionEnabled = false
whiteView.backgroundColor = UIColor.whiteColor()
whiteView.tag = 1000
self.navigationBar.addSubview(whiteView)
self.navigationBar.backgroundColor = UIColor.clearColor()
self.navigationBar.sendSubviewToBack(whiteView)
}
}
이 기능은 흰색 뷰를 적용하고 그와 아이폰 OS (10)에 문제가 있었다, 그래서 나는이 변경했습니다
func applyWhiteEffect(){
var bounds = self.navigationBar.bounds
let whiteView = UIView()
bounds.origin.y = -20
bounds.size.height = 20
whiteView.frame = bounds
whiteView.autoresizingMask = [.FlexibleWidth, .FlexibleHeight]
whiteView.userInteractionEnabled = false
whiteView.backgroundColor = UIColor.whiteColor()
whiteView.tag = 1000
self.navigationBar.addSubview(whiteView)
self.navigationBar.backgroundColor = UIColor.whiteColor()
self.navigationBar.sendSubviewToBack(whiteView)
}
변경 상태 표시 줄 만 볼 수있는보기 및 self.navigationBar.backgroundColor = UIColor.whiteColor()
어쨌든 도와 주셔서 감사합니다. D
titleView를 설정하면 제목이 사용되지 않습니다. 당신이하는 일에 대한 몇 가지 코드를 보여 주시겠습니까? –