The iPhone camera toolbar is gray and has a slight gradient. I believe I could achieve the same look by setting the tintColor and/or translucency of the toolbar.
Any idea how I could make my toolbar look exactly like the camera one?
This isn't quite right... too dark:
UIToolbar *tb = [[UIToolbar alloc] initWithFrame:frame];
tb.tintColor = [UIColor grayColor];
try
tb.barStyle = UIBarStyleBlack;
or
tb.barStyle = UIBarStyleBlackTranslucent;
将工具栏的barStyle属性设置为UIBarStyleBlackTranslucent是否可以提供所需的效果?
this works for me on iOS 7.1
tb.barStyle=-1;
tb.backgroundColor=[[UIColor blackColor]colorWithAlphaComponent:0.2];
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.