Mobile Mobile - 1 year ago 78
iOS Question

Black bars showing when running app on iOS 7 (4 inch retina display)

We have an

app built with base

App has a
with three tabs and each tab has a
to load a different view.

The app works fine for
iOS 6.1
iOS 7
(3.5 inch display) simulator and device but when we run the app on
iOS 7
(4 inch display simulator) or device we are getting black bars at the top and bottom of the view screen in all three tabs.
If anyone can suggest reason for this or some feasible solution to this problem, it would be really helpful for us.


Answer Source

First thing is that you must add the required default image for 4 inch screen display. Check Properly in you project have image with name Default-568h@2x.png (640 × 1136 pixels)

This Default-568h@2x.png is Necessary for Support app in 4 inch Screen display

Ones you add this image in to you working Project, Remove old Build from device or Simulatore, clear Project and re build and check Hope you issue will solve.


After fix the black Bar issue you can check the device like my answer Give here check this:-

Objective c how detect iphone, iphone5 and iPad

you have two choice if you can't use AutoLayout


Create two xib with same class one for 3.5 inch screen and one for 4 inch screen set using macro with checking which screen appear.


Set Self.view frame using macro with checking which screen appear.

There are also other methods you can use for set self.view frame as using window frame or UIScreen

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download