Problem with displaying UIView in iOS 7

I am already making an application for ios 6 using xib. All views are displayed in exactly the same way as xib. But in iOS 7, due to the state of Bar, the view moves up and there is empty space at the bottom.

How can I solve this problem?

+3
ios iphone ios6 ios7 view
source share
5 answers

Move your views so that they display correctly for iOS7, and use the iOS6/7 Deltas in the interface builder to add the correct amount of delta height so that your view displays correctly in iOS6.

iOS 6/7 Deltas

Also see: https://stackoverflow.com/a/167129/

+5
source share

For iOS7, you have the top line of the status bar at the top, which by default was in iOS6.

 float SystemVersion=[[[UIDevice currentDevice] systemVersion] floatValue]; if(SystemVersion<7.0f) { //Currently your app is running in IOS6 or older version. So you need not to do anything. } else { // Currently your app is running in IOS7. Do the following. CGRect TempRect; for(UIView *sub in [[self view] subviews]) { TempRect=[sub frame]; TempRect.origin.y+=20.0f; //Height of status bar [sub setFrame:TempRect]; } } 
+3
source share

Steps to fix the problem in the status bar:

  • Change the setting to "on iOS 7 and later " and clear the Use automatic location from file inspector check box .

  • Go to the size inspector and increase the value of 20 pixels starting y to all the controls added to the selected xib .

  • And increase the y delta value to -20 for all controls added to the selected xib.

And run in both iOS 6 and iOS 7 problems should be fixed. ( Make sure the y-start and delta values ​​are handled perfectly, as I mentioned.)

For more information, see my answer at this link: https://stackoverflow.com/a/166189/

For reference

enter image description here

+2
source share

You can easily set the contents of UIView correctly on ios7 and ios6 using the ios6 / 7 delta show in the size inspector by changing the values ​​in delta x, delta y, delta width, height delta. First set the values ​​for ios7 to x, y, width, height, and then check and then set deltas for ios6 by subtracting and adding numbers. I do it too, and it's that simple, you can get help from me ant time..thanks

+1
source share

If you have a custom UINavigationController , try setting the translucent property in navigationBar to NO as:

 navigationBar.translucent = NO; 

It worked for me

0
source share

All Articles