I'm making an UIToolbar above keyboard and it doesn't have blur effect in iOS 7, it's just grey. I've tried to change alpha value, backgroundColor, explicit YES to translucent, but it all didn't work. Appreciate any help!
wildmonkey's answer is correct but keep no one mentioned that this is limited to UINavigationBar
so I thought I would add to the answer collection here. If you would like the appearance of UIToolbar
, which allows you to have UIBarButtonItem
in it (while UINavigationBar
does not allow that), you could create a transparent UIToolbar
on top of an empty UINavigationBar
(empty title string or remove the navigation item altogether) to get the appearance you are looking for. Be sure that UIToolbar
is ordered on top. In the list of interface builder, it should look like the following:
You could try this:
[toolbar setBarStyle:UIBarStyleBlackTranslucent];
[toolbar setBarTintColor:[UIColor yellowColor]];
[self.toolbar setTranslucent:YES];
it should work then you can tweak bar tint color and adding the alpha component if you like.
wildmonkey's answer is correct but keep no one mentioned that this is limited to UINavigationBar
so I thought I would add to the answer collection here. If you would like the appearance of UIToolbar
, which allows you to have UIBarButtonItem
in it (while UINavigationBar
does not allow that), you could create a transparent UIToolbar
on top of an empty UINavigationBar
(empty title string or remove the navigation item altogether) to get the appearance you are looking for. Be sure that UIToolbar
is ordered on top. In the list of interface builder, it should look like the following:
© 2022 - 2024 — McMap. All rights reserved.