Black bars showing when running app on iOS 7 (4 in

2019-01-01 13:28发布

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

7条回答
泪湿衣
2楼-- · 2019-01-01 13:42

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 
查看更多
有味是清欢
3楼-- · 2019-01-01 13:45

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.

查看更多
长期被迫恋爱
4楼-- · 2019-01-01 13:49

Mine was even easier to fix. I only typed LaunchScreen in the Launch Screen File field.

  1. Click on the Project file in Project Navigator
  2. Click General tab
  3. Type "LaunchScreen" in the Launch Screen File field
  4. Save
查看更多
荒废的爱情
5楼-- · 2019-01-01 13:50

Same problem. For ios 8.1 check whether the launch file is configured properly in the main configuration window. For ios 7.1 ensure that the launch image contains 640x1136 image.

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

查看更多
伤终究还是伤i
6楼-- · 2019-01-01 13:51

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

查看更多
ら面具成の殇う
7楼-- · 2019-01-01 14:02

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

查看更多
登录 后发表回答