How about
toolbar.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.1];
質問
I have an iOS app that I want to to add more than just 2 items to my navigation bar. One way I have read to do this is to add a toolbar one of your bar button items and then add however many items you want to the toolbar. This seems to work well, except my navbar is translucent (iOS 7 default). This causes the toolbars opacity to overlap with the navbar, causing a noticeable white square if the user scrolls dark content underneath the navbar.
If I could get the toolbar background to be clear, then this would resolve my problem. Does anyone know how to do this, or another way around this issue? Just setting the background of the toolbar to clear does not seem to work.
解決
How about
toolbar.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.1];