Change color of translucent black UINavigationBar

前端 未结 4 1424
后悔当初
后悔当初 2020-12-24 05:45

I stumbled upon this many times, never found a solution. A UINavigationController\'s navigationBar can be set to black translucent like:

self.navigationContr         


        
4条回答
  •  臣服心动
    2020-12-24 06:23

    At least in iOS 6 on an iPhone 4S, you can make a colored translucent navigation bar like this:

    self.navigationController.navigationBar.tintColor = [UIColor blueColor];
    self.navigationController.navigationBar.translucent = YES;
    

    The alpha setting doesn't seem to be necessary anymore. This also leaves my title bright white and my buttons opaque.

提交回复
热议问题