[英]iOS navigation bar lighter on some tab pages
我的導航欄沒什么問題。
在某些選項卡上,它更暗,但在某些選項卡上,它更亮。
我對兩者都使用相同的導航視圖控制器類。
import UIKit
class NavigationViewController: UINavigationController {
override func viewDidLoad() {
super.viewDidLoad()
let backBtnTitle = UIBarButtonItem(title: "", style: .Plain, target: nil, action: nil)
navigationBar.topItem?.backBarButtonItem = backBtnTitle
navigationBar.barTintColor = UIColor(red:0.12, green:0.6, blue:0.64, alpha:1)
navigationBar.tintColor = UIColor.whiteColor()
navigationBar.barStyle = .Black
let attributes = [
NSFontAttributeName: UIFont(name: "HelveticaNeue-Light", size: 24)!,
NSForegroundColorAttributeName: UIColor.whiteColor()
]
navigationBar.titleTextAttributes = attributes
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
}
}
我該如何解決,使兩者都變深?
解:
self.navigationBar.translucent = false
在導航視圖控制器中。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.