iOS7 nav bar translucent = NO

前端 未结 3 1457
闹比i
闹比i 2021-01-16 03:52

I have a background image, the same image in all views, but the nav bar traslucent is set by default to YES and the background is not homogeneous. I tried various solutions

相关标签:
3条回答
  • 2021-01-16 04:04

    try this for ios 7

         [self.navigationController.navigationBar setBarTintColor:[UIColor whiteColor]];
    
    0 讨论(0)
  • 2021-01-16 04:12

    Because the AppDelegate is not a UINavigation Controller. You can do what you done on previous lines is to set the navigationbar appearance globally.

    [[UINavigationBar appearance] setTranslucent:NO];
    
    0 讨论(0)
  • 2021-01-16 04:25

    You can do that in your root view controller

    //inside the root view controller
    - (void)viewDidLoad
    {
        [super viewDidLoad];
        [self.navigationController.navigationBar setTranslucent:NO];
    }
    

    Also you can toggle translucent in the interface builder. Select your Navigation Controller then in the Document Outline select the Navigation Bar and just change it in the Attributes Inspector

    Attributes Inspector Navigation Bar

    0 讨论(0)
提交回复
热议问题