Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
999 views
in Technique[技术] by (71.8m points)

objective c - ios7 - iPhone 5 giving white space at the top

Client has come back to me on projects saying they see white space on the top (they can't see the default things like time, wifi signal, etc) at the top.

This is happening when they installed iOS7 on their iPad.

Any idea why this is happening?

Note:

I have navigation bar as image. I hide the navigation bar and put navigation bar as an image.


Downvoters

I know this is not a perfect question for SO, but I thought to ask to take inputs. Tomorrow I am going to study on it.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

It's due to the status bar.

In your XIB or Storyboard chose to view your xib as iOS 6 :

enter image description here

On your view, add a Content View (you will add your outlets elements inside this content view) and add a Y delta of 20 (for the status bar) :

enter image description here

Now, if you compile your app on iOS 7 or iOS 6, your view will go up or down and you won't have the space anymore.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...