0
votes

i'm trying change status bar color for the same color that i have in navigation bar. I did this:

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];

Navigation bar color is web safe color translucent 009999

How can i set this color at background color parameters?

1

1 Answers

0
votes

Try this

addStatusBar.backgroundColor = [UIColor colorWithRed:0/255.0 green:153/255.0 blue:156/255.0 alpha:1];