我正在尝试使用导航栏中的相同颜色更改状态栏颜色。我这样做了:
UIView *addStatusBar = [[UIView alloc] init];
addStatusBar.frame = CGRectMake(0, -20, 320, 20);
addStatusBar.backgroundColor = [UIColor colorWithRed:0 green:153 blue:156 alpha:1];
[self.view addSubview:addStatusBar];
[self.navigationController.navigationBar addSubview:addStatusBar];
导航栏颜色为网页安全色半透明009999
如何在背景颜色参数中设置此颜色?
答案 0 :(得分:0)
试试这个
addStatusBar.backgroundColor = [UIColor colorWithRed:0/255.0 green:153/255.0 blue:156/255.0 alpha:1];