IPhone, how to make the toolbar the same black opaque as the navigation bar?

I use ... (although I tried other things)

Before I tried, it looked like this.

alt text

tools = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, 70, 44.01)];
//tools.backgroundColor = [UIColor blackColor];
//tools.backgroundColor = [UIColor clearColor];
//tools.barStyle = UIBarStyleBlackTranslucent;
tools.barStyle = UIBarStyleBlackOpaque;

It looks like this....

alt text

How can I match the black opaque layout of the navigation bar?

+3
source share
2 answers

Assuming you're trying to add a UIToolBar to a black opaque navigation bar as your snapshots show, this blog post seems to give the answer you are looking for:

http://blog.blackwhale.at/tag/uibarstyleblackopaque/

(Mirroring in case the blog leaves: http://miro.ir/xB8fW/blog-blackwhale-at_tag_uibarstyleblackopaque_ )

, UIToolBar, UINavigationBar.

0

. . , .

+2

Source: https://habr.com/ru/post/1773266/


All Articles