How to change the text color of text which is appear on UIStatusbar?i am presenting a view Controller on my RootviewController than the Status Bar color change according to my view controller so i just want to change the text color on UIStatusBar. if we unable to change the text color than how to fix the UIStatusBar overlapping the header in IOs7 ? Thanks in Advance
Asked
Active
Viewed 252 times
1 Answers
0
Please try following lines in the applicationdidfinishlaunching method of app delegate file
self.window.clipsToBounds = YES;
[UIApplication sharedApplication].statusBarStyle=UIStatusBarStyleDefault;
_mainViewController_iPhone.view.frame=CGRectMake(0, 60, 320, 1140);
self.nav=[[UINavigationControlle alloc]initWithRootViewController:_mainViewController_iPhone];
self.window.rootViewController = self.nav;
self.nav.navigationBarHidden=YES;
appDel.navmain=nav;
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0) {
UIView *addStatusBar = [[UIView alloc] init];
addStatusBar.frame = CGRectMake(0, 0, 320, 20);
appDel.viewbar=addStatusBar;
addStatusBar.backgroundColor = [UIColor blackColor]; //change this to match your navigation bar
[self.window addSubview:addStatusBar];
}
//[_window addSubview:_mainViewController_iPhone.view];
[_window makeKeyAndVisible];
I hope this will help you.

Dhiraj Umale
- 92
- 1
- 7
-
Thanks its working for me but its very tricky.. – RKJ Nov 27 '13 at 14:09