【发布时间】:2013-10-30 23:05:02
【问题描述】:
我有这样的代码:
UIView *colorView = [[UIView alloc] init];
colorView.frame = CGRectMake(0.0, 0.0, self.view.frame.size.width, 64.0);
colorView.backgroundColor = [UIColor blackColor];
//colorView.tintColor = [UIColor blackColor];
UIToolbar *toolbar = [[UIToolbar alloc] init];
toolbar.frame = CGRectMake(0.0, 0.0, self.view.frame.size.width, 44.0);
self.view addSubview:colorView];
[self.view addSubview:toolbar];
为什么工具栏子视图的颜色与我的视图不同?视图显示为黑色,工具栏显示为浅灰色?是否有模糊或其他原因?
【问题讨论】:
-
我想制作一个高度为 64.0 的工具栏,其 tintColor 与我的导航栏相同。
-
默认情况下,
-barStyleforUIToolBar是Translucent lightiniOS7。您可以将其更改为Translucent dark。
标签: ios uiview ios7 uitoolbar tintcolor