SplitViewController detailViewComtroller 的 NavigationBar 颜色变为粉灰色 [英] SplitViewController detailViewComtroller's NavigationBar color changes to pink grayish

查看:26
本文介绍了SplitViewController detailViewComtroller 的 NavigationBar 颜色变为粉灰色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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

请帮忙...

推荐答案

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

}

这篇关于SplitViewController detailViewComtroller 的 NavigationBar 颜色变为粉灰色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆