iOS7 nav bar translucent = NO

前端 未结 3 1458
闹比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: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

提交回复
热议问题