Reputation: 7776
I'm using... (although I've tried other things)
Before I I tried, it looked like this..
tools = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, 70, 44.01)];
//tools.backgroundColor = [UIColor blackColor];
//tools.backgroundColor = [UIColor clearColor];
//tools.barStyle = UIBarStyleBlackTranslucent;
tools.barStyle = UIBarStyleBlackOpaque;
This looks like this....
How can I match the navigation bar black opaque scheme ?
Upvotes: 3
Views: 849
Reputation: 16636
You shouldn't try to add a toolbar to a navigation bar. They're not meant to work that way. Instead, modify the navigation item for your view controller to display the controls you want.
Upvotes: 2
Reputation: 33650
Assuming you are trying to add a UIToolBar to a black opaque navigation bar as your pictures show, this blog post seems to provide the answer you're looking for:
http://blog.blackwhale.at/tag/uibarstyleblackopaque/
(Mirrored in case the blog goes away: http://miro.ir/xB8fW/blog-blackwhale-at_tag_uibarstyleblackopaque_)
It shows how to make a transparent UIToolBar that you can place on a black opaque UINavigationBar.
Upvotes: 0