I have to set a mask on the navigation bar that I can animate the icons down out of the bar. After I set the mask the status bar is black. Therefore I set a View under the status bar.
I copy exactly the colour properties from the status bar but nevertheless is the colour different. Any idea why? Any idea for a solution?
I tested on iOS 7.0 & 7.1
Cheers!
self.navBar = self.viewController.navigationController.navigationBar;
self.navBar.clipsToBounds = YES;
UIToolbar * statusBarBg = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, 320, 22)];
statusBarBg.barTintColor = self.navBar.barTintColor;
statusBarBg.tintColor = self.navBar.tintColor;
statusBarBg.translucent = self.navBar.translucent;
statusBarBg.backgroundColor = self.navBar.backgroundColor;
[self.navBar.superview addSubview:statusBarBg];