I would like to add a blurry effect on my view, and I used a UIToolbar
to do that. But when I try to add bar tint color on the UIToolbar
, something weird happens.
Here is the code I used to add UIToolbar
, very basic, nothing fancy:
UIToolbar *toolbar = [[UIToolbar alloc]initWithFrame:CGRectMake(0, 0, self.blurView.frame.size.width, self.blurView.frame.size.height)];
[self.blurView addSubview:toolbar];
Before I add the barTintColor
, everything looks good:
But after I add bar tint color:
[toolbar setBarTintColor:[UIColor colorWithWhite:0.000 alpha:0.500]];
Everything under the toolbar becomes black and white:
At first I thought something wrong with the color or the transparency, I've been playing with different color and different transparency. As long as I use setBarTintColor
, it all becomes black and white like that. For example, a random bluish green: