//讓返回沒有文字顯示
self.navigationItem.backBarButtonItem = UIBarButtonItem(title: "", style: .Plain, target: nil, action: nil)
//設置返回按鈕圖示
self.navigationController!.navigationBar.backIndicatorImage = UIImage(named:"icon_page.png")!
self.navigationController!.navigationBar.backIndicatorTransitionMaskImage = UIImage(named:"icon_page.png")!
//另外可以改顏色
var nav = self.navigationController?.navigationBar
nav?.barStyle = UIBarStyle.Black
nav?.tintColor = UIColor.greenColor()
//如要改特定顏色,可以查詢色碼,上述的barStyle那一行變成
nav?.barTintColor = UIColor(red:0.24, green:0.23, blue:0.22, alpha:1.0)
沒有留言:
張貼留言