SplitViewController detailViewComtroller的NavigationBar颜色变为粉红色灰色

时间:2014-05-08 11:02:53

标签: ios uinavigationbar uisplitviewcontroller

当我在splitviewcontroller中更改detailViewcontroller时,其导航栏颜色变为粉红灰色。无法理解为什么会发生这种情况。

请帮忙......

1 个答案:

答案 0 :(得分:0)

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]];

}