0
  if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) {

        [application setStatusBarStyle:UIStatusBarStyleLightContent];

        self.window.clipsToBounds =YES;

        self.window.frame =  CGRectMake(0,20,self.window.frame.size.width,self.window.frame.size.height-20);
    }

i am using this code it will adjust the status bar but when i present any view controller it will give problem.

chandan
  • 2,453
  • 23
  • 31
Akshay
  • 425
  • 1
  • 5
  • 16

2 Answers2

0

In iOS 7 the status bar is transparent and it is not a part of the window hope you understand this.

Divyam shukla
  • 2,038
  • 14
  • 18
  • it will working fine. but when i prensent a view controller over another view controller my top bar.png is hidden under the status bar. Thats the problem.??? – Akshay Nov 11 '13 at 11:24
  • http://stackoverflow.com/questions/18980925/status-bar-issue-and-navigation-bar-issue-in-ios7 You should follow this link it may help you there are steps to manage this thing – Divyam shukla Nov 11 '13 at 11:35
0

in your view controller if it embedded in UINavigationController use this

- (void)viewDidLoad{
    //add this 2 lines:
    if ([self respondsToSelector:@selector(edgesForExtendedLayout)])
        self.edgesForExtendedLayout = UIRectEdgeNone;

    [super viewDidLoad];
}
Suhit Patil
  • 11,748
  • 3
  • 50
  • 60
  • i adding these two lines but still not working.. it shows white space below status bar. – Akshay Nov 11 '13 at 11:36
  • read the solution in this link http://stackoverflow.com/questions/18980925/status-bar-issue-and-navigation-bar-issue-in-ios7?lq=1 – Suhit Patil Nov 11 '13 at 11:39