Black bars showing when starting the application on iOS 7 (4-inch retina display)

We have an iPod app built with an SDK base like 5.1. An application has a tabBarController with three tabs, and each tab has a UIViewController to load a different view.

The application works fine for the simulator and device iOS 6.1 and iOS 7 (3.5-inch display), but when you start the application iOS 7 (simulator 4-inch display) or a device on which we get black bars at the top and bottom of the viewing screen at all three tabs. If someone can suggest a reason for this or a possible solution to this problem, it would be really useful for us.

thank

+60
ios objective-c iphone ios7 iphone-5
Sep 20 '13 at 9:20
source share
7 answers

First of all, you must add the required default image for the 4-inch screen. Make sure you have an image in your project with the name Default-568h@2x.png (640 Γ— 1136 pixels)

This Default-568h@2x.png is required to support the application on a 4-inch display screen.

You add this image to your working project, delete the old assembly from the device or Simulatore, clear the project and restore the assembly and check. I hope you solve the problem.

Edit: -

After fixing the problem with the black bar, you can check the device as my answer. Let me check this out here: -

Detect device type

you have two options if you cannot use AutoLayout

First

Create two xib with the same class for the 3.5-inch screen and one for the 4-inch screen using a macro to check which screen appears.

Second

Set the Self.view frame using a macro, checking which screen appears.

There are other methods that you can use to set the self.view frame using a window or UIScreen frame.

+104
Sep 20 '13 at 9:23
source share

My problem was that I accidentally deleted the value found here:

enter image description here

I added LaunchScreen back and made sure there was LaunchScreen.xib. Perhaps this will help some others.

+62
Oct 11 '14 at 3:47
source share

I had the same problem: black bars at the top and bottom. This was simply resolved by setting the drop-down list in β€œApplication Icons and Launching Images” on Main_iPhone:

Application screen and screenshots

+3
Oct 31 '15 at 17:58
source share

Same problem. For ios 8.1, check if the startup file is configured correctly in the main configuration window. For ios 7.1, make sure the startup image contains a 640x1136 image.

This will fix the black bar problem on both ios when running in the simulator.

+2
Jun 13 '15 at 7:00
source share

Mine was even easier to fix. I just typed LaunchScreen into the Launch Screen File field .

  • Click Project file in Project Navigator
  • Click General tab
  • Enter "LaunchScreen" in the Launch Screen File field
  • Save
+2
Oct 23 '15 at 19:04
source share

I had the same problem. I just added a launch image and it worked for me.

Xcode-> Click Project File β†’ Select Target-> App Icons and Launch Images β†’ Add Source Image Source

+1
Apr 14 '15 at 6:17
source share

It worked!

Pay attention to step number 5 and step number 6 below:

 1.In xcode, Click on the Project file in Project Navigator 2.Click General tab 3.Type "Main_iPhone" in the Launch Screen File field 4.Save 5.Remove the app from device or simulator 6.Then in Xcode go to Product Menu and then select Clean 7.Build again 
+1
Dec 24 '15 at 0:30
source share



All Articles