Colors iOS可以';t自7.1起设置工具栏颜色的alpha值

Colors iOS可以';t自7.1起设置工具栏颜色的alpha值,colors,toolbar,alpha,ios7.1,bartintcolor,Colors,Toolbar,Alpha,Ios7.1,Bartintcolor,在升级xcode以包含iOS7.1之后,我遇到了一个有线问题。 工具栏的背景色在模拟器中显得非常明亮,更改alpha值对其没有任何影响。红色过去是浅红色 我在viewDidLoad中设置了颜色: [self.navigationController setToolbarHidden:NO]; //animated:YES [self.navigationController.toolbar setBarTintColor:[UIColor colorWithRed:0.8f green:0.0

在升级xcode以包含iOS7.1之后,我遇到了一个有线问题。 工具栏的背景色在模拟器中显得非常明亮,更改alpha值对其没有任何影响。红色过去是浅红色

我在
viewDidLoad
中设置了颜色:

[self.navigationController setToolbarHidden:NO]; //animated:YES
[self.navigationController.toolbar setBarTintColor:[UIColor colorWithRed:0.8f green:0.0f blue:0.0f alpha:0.5]];
[self.navigationController.toolbar setTranslucent:YES];

有什么想法吗?

设置图像仍然有效:

UIImage* toolbarImage = [UIImage imageNamed: @"myimagename"];
[[UIToolbar appearance]
     setBackgroundImage: toolbarImage
     forToolbarPosition: UIToolbarPositionAny
     barMetrics: UIBarMetricsDefault];
此图像为png时可以是半透明的