SplitViewController detailViewComtroller's NavigationBar color changes to pink grayish

泪湿孤枕 提交于 2019-12-10 12:34:35

问题


When i change detailViewcontroller in splitviewcontroller its navigation bar color changes to Pinkish gray color. Not able to understand why happening this.

Please help...


回答1:


If you customise  your navigation bar then your view will disappear into set your main view (parent) view color

-(void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
     //Set Your color of navigation bar.
}

-(void)viewWillDisappear:(BOOL)animated{
    [super viewWillDisappear:animated];
    //Set your color of main view controller (parent view color).
  [[[self navigationController] navigationBar] setTintColor:[UIColor your color]];

}


来源:https://stackoverflow.com/questions/23539913/splitviewcontroller-detailviewcomtrollers-navigationbar-color-changes-to-pink-g

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!