【发布时间】:2016-06-05 15:38:34
【问题描述】:
我正在尝试设置导航栏后退按钮的颜色和后退按钮的 V 形。
我的应用从导航控制器开始。
此导航控制器有一个自定义类,其中包含以下几行:
- (void)awakeFromNib {
[super awakeFromNib];
UIColor *white = [UIColor whiteColor];
[self setTintColor: white];
// [self setBarTintColor: white];
UIFont *fonte = [UIFont fontWithName:@"Avenir-Book" size:14.0f];
NSDictionary *atributos = @{NSForegroundColorAttributeName : white,
NSFontAttributeName : fonte
};
[self setTitleTextAttributes:atributos];
}
导航控制器的根视图控制器隐藏了导航栏。这个根视图控制器称为主屏幕。
从那个视图控制器中,我推送另一个具有可见导航栏的视图控制器。该导航栏没有我添加的后退按钮,但iOS在“
难道这些不应该尊重导航栏类上使这些项目变为白色的设置吗?
怎么了?
【问题讨论】:
-
试试 [self.appearance setTintColor:[UIColor yourcolor]];
-
没有self.appearance api。
标签: ios iphone uinavigationcontroller uinavigationbar