Iam using status bar in my application and i wriiten the code in the following manner
My project includes tab bar controller. So, after picking an image from library my status bar is changing its postion. How can it solved?
please Anybody help on this I wasted Lot of time With this.
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7)
{
self.window.clipsToBounds = YES;
[[UIApplication sharedApplication] setStatusBarStyle: UIStatusBarStyleBlackOpaque];
UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation;
if(orientation == UIInterfaceOrientationLandscapeLeft || orientation == UIInterfaceOrientationLandscapeRight)
{
self.window.frame = CGRectMake(0, 0,self.window.frame.size.width-20,self.window.frame.size.height);
self.window.bounds = CGRectMake(0, 0, self.window.frame.size.width, self.window.frame.size.height);
} else
{
self.window.frame = CGRectMake(0,20,self.window.frame.size.width,self.window.frame.size.height);
self.window.bounds = CGRectMake(0, 20, self.window.frame.size.width, self.window.frame.size.height);
}
}
Thanks in Advance.