Top and bottom cut off in iOS simulator [duplicate] - ios

I would like to get some help on how to handle app (storyboard) is set to Universal.
When app run (with a single viewcontroller with a navbar) on a iPhone 5s simulator (with iOS 7.x), a thick black appears on top & bottom
iPhone 5s with iOS 7.x SDK
When switch to iPhone 5.0 with iOS 8.x simulator, no issue.
iPhone 5s with iOS 8.x SDK
Is there any code to fix (remove header & footer) gap in black?

The thick black bars on top and bottom (also known as letterboxing) are because you have no launch image for the 4-inch screen. Add one. Without this, your app is treated as if it were running on a 4s (3.5-inch screen).

Related

Mysterious black border (only) at bottom of iPhone first screen

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.
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:
The following screen shot shows a screen from inside the application, with no black border at the bottom:

Xcode 7.1.1 UINavigationBar does not cover the entire width of the screen with iPhone 6 and above

My app was acting fine till I updated my Xcode. For some odd reason, my UINavigationBar is no longer covering the entire width of the screen for devices iPhone6 and above.
For iPhone 5:
For iPhone 6 and above:
I think you didn't used autolayout. Okay no problem..
Follow below steps:
1. you need to keep it empty on Launch Screen file.
2. Create Launch image source and then add iPhone 6 and 6+ splash screens
Then it will work your navigation bar automatically fit based on device.

Xcode 7 - How to disable iPhone 6 native resolution?

I want my app only to run in iPhone 4 and iPhone 5 resolution. In Xcode 6, you just needed to delete the Launch Screen file in order to lower the resolution ( How to disable iPhone 6 native resolution?)
However, now if you don't have a Launch Screen, your lower resolution apps will show up with black bars on top and bottom. So to fix this you have to add a Launch Screen Storyboard (iOS 9 Xcode 7 - Application appears with black bars on top and bottom)
Is there any way to run apps on lower resolutions without having these black bars show up?

Black bar at the bottom after update to iOS 8

I have an app on the store and I started working on the update for iOS 8 a while ago, everything seemed to work fine except for this problem I'm having with the layouts. No matter what device I test the app on, there's always a black bar at the bottom (or the side on landscape mode).
Test on iPhone 5S
Test on iPhone 4S
Is this an issue with iOS 8? How can I solve it?
I had this same issue with the thin bar along one side when an iOS 8 device was rotated to landscape. I found the solution to this problem here: Building project with Xcode 6 (iOS 8 SDK) causes landscape rotation rendering issue on iPad
The fix I did was to go to MainWindow.xib, select the Window, then go to the Attributes inspector and select the two check boxes for Visible at Launch and Full Screen at Launch.

UIToolBar Not Showing In 3.5 Inch Simulator

I have an iPhone app that has a UIToolBar added at the bottom in a View Controller with button on it. I was just testing it and found that the UIToolBar is not showing in the 3.5-inch iPhone simulator in Xcode. While its properly showing up in 4-inch iPhone Simulator and 4-inch 64-bit iPhone Simulator. Its even showing up properly on all iPads simulator.
I don't have any 3.5 inch iPhone to test it on the device since i only own an iPhone 5 and iPad 2. Although its hard to tell but can anyone point out what could be the problem or how can i troubleshoot it to find the problem?
Try clicking on the toolbar in storyboard and the from the icons on the bottom left section from second from right select reset to suggested layouts and see if that will solve your issue.

Resources