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

IphoneIosObjective CIos7Iphone 5

Iphone Problem Overview


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

The app works fine for iOS 6.1 and 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.

Thanks

Iphone Solutions


Solution 1 - Iphone

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 [email protected] (640 × 1136 pixels)

This [email protected] 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.

Edit:-

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

https://stackoverflow.com/questions/13139430/objective-c-how-detect-iphone-iphone5-and-ipad/13139561#13139561

you have two choice if you can't use AutoLayout

First

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.

Second

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

Solution 2 - Iphone

My problem was I accidentally deleted the value found here:

enter image description here

I added back LaunchScreen, and made sure there was a LaunchScreen.xib. Maybe it will help some others.

Solution 3 - Iphone

Ive had the same problem - black bars at the top and bottom. It was simply solved by setting the drop down in "App Icons and Launch Images" to Main_iPhone:

App Icons and Launch Images Screen Shot

Solution 4 - Iphone

I was facing same problem . I just added launch image and it worked for me.

XCode->Click on Project File -> Select Target-> App Icons and Launch Images -> Add launch image source

Solution 5 - Iphone

This worked!

Pay attention to Step#5 and Step#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 

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionUser0911View Question on Stackoverflow
Solution 1 - IphoneNitin GohelView Answer on Stackoverflow
Solution 2 - IphoneUserView Answer on Stackoverflow
Solution 3 - IphoneMiltsInitView Answer on Stackoverflow
Solution 4 - IphoneAbhijeet SawantView Answer on Stackoverflow
Solution 5 - IphoneEdwin O.View Answer on Stackoverflow