Monday, December 29, 2014

Black Bars Issue in iOS 7 Simulator

I stumbled on to this issue recently when I started a project which I was asked to support from iOS 7 upwards. I setup my Xcode project and took it for a spin in the simulator in both iOS 7 and iOS 8.

In iOS 8, everything looked good and normal.

But in iOS 7, a weird UI issue surfaced.

The UI seemed shrinked and two black bars appeared at the top and bottom. After pulling my hair for a good hour or two, I found the solutions.

To fix this, you need to add two launch images. Now in iOS 8, you can use an xib file in the place of launch images thus eliminating the need to create a bunch of images in different sizes to support each device, orientations and screen resolutions. But we get this luxury only in iOS 8. If we're supporting iOS 7, you still need to include launch images the old way.

I added these two launch images.

Default@2x.png              640 x 960
Default-568h@2x.png     640 x 1136

And the above issue was fixed!

1 comment:

  1. These ways are very simple and very much useful, as a beginner level these helped me a lot thanks fore sharing these kinds of useful and knowledgeable information.
    iOS App Development Company
    Android App Development Company