user1695971
user1695971

Reputation: 113

Xib Size - seems to think its longer than it is

This is a bit of a strange one, but basically I am having a problem whereby the xib size of my initial view controller seems to be longer than the screen.

So, if you have an ad banner set to be on the bottom of the screen... If I run the app in simulator, it does not show on iPhone 3GS/4/4S devices, yet WILL show on the iPhone 5.

I have tried changing the xib size settings, I even created a new xib file, but the same problem is occuring which leads me to believe it is hardcoded somewhere, but I cannot think where to look for this.

It is basically like it thinks the bottom of the screen is about 30-50px more than what it actually is... Hence why the iPhone5 displays ok as it has the taller screen.

Any help would be appreciated!

Upvotes: 0

Views: 66

Answers (2)

Dilip Manek
Dilip Manek

Reputation: 9143

Its bcoz of the StatusBar. It reserve 20px of screen . You can remove this space by do change in Status bar is initially hidden in plist and set status bar to NONE in IB.

Upvotes: 1

Fls'Zen
Fls'Zen

Reputation: 4654

The iPhone 5 has a taller screen. The most flexible way to lay out your xib is via AutoLayout. Here is a tutorial to get you started:

http://www.raywenderlich.com/20881/beginning-auto-layout-part-1-of-2 http://www.raywenderlich.com/20897/beginning-auto-layout-part-2-of-2

Basically, you want the ad banner to be contrained to the bottom of the view.

Upvotes: 1

Related Questions