I'm trying to change the color of my navigator bar but I found that it's only impossible if the navigator is the root one.
I'm trying this:
self.navigationController?.navigationBar.translucent = true
self.navigationController!.navigationBar.barTintColor = UIColor.blueColor()
All my Viewcontrollers
are related to navigator controllers. However nothing is changed. In fact I tried to make the same things from storyboard but it works only if I'm in the first navigator.
I tried to read everything related to this problem but found nothing
I could add any item to the navigator bar like this
let HomeImage = UIImage(named: "home")!
let Home : UIBarButtonItem = UIBarButtonItem(image: HomeImage, style: .Plain, target: self, action: "home:")
navigationItem.rightBarButtonItem = Home
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…