-1

Before io7 my view show perfect result to me just like io6 view

but in ios7 status bar overlap to my view content like this io7 view

before i go through googling i found one solution that sat delta property of the view in Xcode 5. i completed that. but still same issue. just like property set Delta

please don't give me suggestion like hide status bar.
I am not using storyboard. i am not using auto layout

i refered this link unable to find answer. Thanks In Advance

Jignesh B
  • 490
  • 7
  • 18

2 Answers2

1

I did below code for solving this problem.

- (void) viewDidLayoutSubviews {
    CGRect viewBounds = self.view.bounds;
    CGFloat topBarOffset = self.topLayoutGuide.length;
    viewBounds.origin.y = topBarOffset * -1;
    self.view.bounds = viewBounds;
}
Sabareesh
  • 3,585
  • 2
  • 24
  • 42
0

add this code in your viewDidLoad method

if ([self respondsToSelector:@selector(edgesForExtendedLayout)])
    self.edgesForExtendedLayout = UIRectEdgeNone;

please refer this link for further info

Community
  • 1
  • 1
Suhit Patil
  • 11,748
  • 3
  • 50
  • 60
  • its not working for me. did you worked? – Jignesh B Oct 30 '13 at 06:31
  • 1
    yes it did work for me, try using autolayout in Xcode 5 with iOS 7, just tick the autolayout option in Xcode. – Suhit Patil Oct 30 '13 at 06:42
  • buddy i don't using autolayout. bcz project run 5.0 and above – Jignesh B Oct 30 '13 at 06:46
  • 1
    This only works if it's in a navigation controller. – huggie Oct 30 '13 at 06:50
  • Check if you are doing this on right UIViewController – MichK Oct 30 '13 at 07:28
  • There is no way to preserve the iOS 6 style status bar layout. The status bar will always overlap your application on iOS 7. Read apple docs https://developer.apple.com/library/ios/qa/qa1797/_index.html or this guide to get the idea http://stackoverflow.com/questions/18294872/ios-7-status-bar-back-to-ios-6-style – Suhit Patil Oct 30 '13 at 07:50