1

I have an iOS application that I wrote in 2011, and I am in the process of upgrading it for the newest iOS’s and devices. I am getting a thick black border at the bottom of the first screen of my application, for most of the device/simulator and iOS combinations. This is not a black border at the top and bottom of screen problem, which has been dealt with exhaustively in the forums.

There is only one black border, at the bottom of the screen. Also, the border is shown only on the first screen of my application, which has the buttons to go to the rest of the application. Even if I navigate back to the first screen of my application, from somewhere inside the application, the border becomes visible. There is no black border in the other screens of the application, apart from the first screen.

This does not seem to be a launch image problem. I have a launch image, in Default-568h@2x.png, and the launch image is working fine. Following are the configurations for which I get or don’t get the black border:

iPhone 4s (iOS 9.2) simulator - no black border
iPhone 5 (iOS 9.2) simulator - black border
iPhone 5 (iOS 8.1.3) device - no black border
iPhone 5s (iOS 9.2) simulator - black border
iPhone 5s (iOS 9.1) device - black border
iPhone 6s Plus (iOS 9.2) simulator - black border

iPad 2 (iOS 9.2) simulator - no black border
iPad Air (iOS 9.2) simulator - no black border
iPad Air 2 (iOS 9.2) simulator - no black border
iPad Pro (iOS 9.2) simulator - thick black border all the way around the application window
iPad Retina (iOS 9.2) simulator - no black border (at bottom of screen)

I’ve tried everything I could think of, but nothing seems to work.

Nisse Engström
  • 4,738
  • 23
  • 27
  • 42
Sandeep
  • 49
  • 1
  • 3
  • So this only happens for one of your screens (the first one)? Is black the background of the view for that view controller? Can you post a screenshot of the black border displaying? – jakedunc Apr 17 '16 at 17:55
  • It only happens for the first screen. The background of the view for that viewcontroller is white. I am not able to post a screen shot to this comment, so I have posted it as a separate answer. – Sandeep Apr 18 '16 at 08:06
  • Try referring this answer http://stackoverflow.com/questions/18913105/black-bars-showing-when-running-app-on-ios-7-4-inch-retina-display – Nirupa Apr 18 '16 at 08:50
  • Thanks for replying, This link actually refers to the case where there are black bars at the top and bottom of the screen. My case is that I am getting a single broad black bar at the bottom of my screen. – Sandeep Apr 18 '16 at 10:58

1 Answers1

0

The following screen shot of the iPhone simulator shows the black border at the bottom of the screen. The size of the simulator image is set to 50% of the full size as shown on the Mac screen, to make it fit on the Mac screen:

First Screen with Black Border at Bottom

The following screen shot shows a screen from inside the application, with no black border at the bottom:

Inner Screen with No Black Border

Community
  • 1
  • 1
Sandeep
  • 49
  • 1
  • 3
  • I would guess that there is a constraint that is doing this. Is the parent view for "planet laws" black? What auto layout constraints does the view have? Are you setting the views frame manually using bounds instead of frame? – jakedunc Apr 18 '16 at 13:05