iOS 7导航栏呈现不正确的RGB

hod*_*smr 1 objective-c ios uiappearance

我正在尝试制作我的导航栏RGB(32,29,29),但当应用程序启动时(目前在Xcode 5.0.2的模拟器中工作),它呈现为RGB(42,38,38).

这是我想要的颜色: 32,29,29

这就是我得到的颜色: 42,38,38

一个微妙的区别,但很奇怪.这是我的AppDelegate.m中的外观代码:

application.statusBarStyle = UIStatusBarStyleLightContent;
[UINavigationBar appearance].tintColor = [UIColor whiteColor];
[UINavigationBar appearance].barStyle = UIBarStyleBlack;
[UINavigationBar appearance].barTintColor = [UIColor colorWithRed:32.0/255.0 green:29.0/255.0 blue:29.0/255.0 alpha:1.0];
[UITextField appearance].keyboardAppearance = UIKeyboardAppearanceDark;
Run Code Online (Sandbox Code Playgroud)

我尝试了删除其中一些设置的变体,看看是否正在应用色调,但到目前为止,我无法弄明白.这是怎么回事?

ran*_*dom 5

我以前在iOS中的颜色略有不同,令人沮丧.您可以尝试将条形设置为不是半透明的:

navigationController.navigationBar.translucent = NO;
Run Code Online (Sandbox Code Playgroud)

它过去对我有用.