0
我正在使用下面的代码来显示工具栏作为拾取器视图的附件视图。我想自定义工具栏的颜色。我不确定在下面的代码中有什么错误。有没有更好的方式来实现这一目标UIToolbar背景颜色不变
UIToolbar* state_close = [[UIToolbar alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 50)];
state_close.translucent =NO; //.barStyle = UIBarStyleDefault;
state_close.barTintColor = [UIColor colorWithRed:0.94 green:0.94 blue:0.94 alpha:1.0];
[state_close sizeToFit];
由于提前
的可能的复制[UIToolbar setBackgroundColor不充分变色](https://stackoverflow.com/questions/19401507/uitoolbar-setbackgroundcolor-doesnt-fully-change-color) –