Black screen on top and bottom of an application in iphone x - ios

I have an old application using .xib file and launch image source. whenever I run application on it give me black space on top and bottom. I have added launchscreen #3x in launchscreen images it distort my complete application on iPhonex. i am not using autolayout.Please help me in this issue if anyone get to solve this issue.

I suppose you are not using launch xib and so you need to added launch image for iPhone-X. of size 1125px × 2436px for portrait and 2436px × 1125px for landscape.
If your constraints are set proper app will work as expectation. Else you have to set proper constraints as well

Related

App does not fit on anything but an iPhone (Plus Models) [duplicate]

Running my App in the iPhone X Simulator (GM Seed) I am noticing two strange effects:
the App does not use the full screen space (top and bottom area is black)
a strange white bar beneath the title bar
Does anybody know what is happening here and how to resolve this? I can't find any new settings in Interface Builder.
When using launch images (instead of the much easier Launch screen file), you need to provide the properly sized launch image for each device size you wish to support. Once you add the additional launch image, your app should take advantage of the new screen size.
The new iPhone X requires a launch image sized at 1125px × 2436px which is a 3x image for 375pt × 812pt.
Of course if you switch over to using a Launch screen file instead of individual launch images, your app will automatically adapt to all device sizes without any additional work.
I have figured out this issues in iPhone X. Launch image size (1125*2436px)
Please flow this below steps.
1.i)Choose your project name in Xcode.
ii)Select your project target
iii)Then select Launch images source
You can get Migrate popup
i) Choose Assets
ii)Select Migrate
After that select your Assets.xcassets in your project
Then select Launch image in assets
i)Then select attribute inspector
finally check your Launch image source. you can see set Launch image.
iPhone X needs different launch image sized 1125px x 2436px (375pt x 812pt #3x).
Check human interface guidelines for more details.
I have figured out how to fix (though I still don't understand why this happened only on iPhone X) LaunchScreen storyboard on iPhone X with seeing black top&bottom bars.
I have LaunchScreen storyboard with one UIImageView.
UIImageView's top&bottom has to be pinned to SuperView's top&bottom. NOT to SafeArea.
I fixed it by simply inserting some random text in the Lanch Screen File textfield. I dont even have a Launch Screen File... XCode is so buggy.
update
Although this fixes it in simulator (still very weird and unexpected) when uploading a binary to iTunes Connect it will fail due to not finding a LanchScreen file of name "random-name"
Just ran into this while trying to update an app I hadn't worked on in a while.
On Xcode 9.4, I was able to fix this by doing the following:
Add a launch screen by going to File -> New -> File... -> Launch Screen
Make sure the newly added launch screen storyboard is selected as the launch screen file under project settings.
If you already have a 1125px × 2436px launch image but the app is still not using the full screen check to make sure that your image is PNG.
if you removed LaunchScreen.storyboard; Choose your project, select your project target, General -> App Icons and Launch Images -> Launch Screen File: Select here Main.storyboard instead of LaunchScreen.storyboard
Just had this problem... When I selected the project & the correct target I had a blank for the 'launch screen file' under the app icons and launch screen images tab. I set it to the default LaunchScreen and the resizing issue I faced was taken care of.
You may check in project target launch screen file is not set to empty if it is empty it may cause problem.
Yes me too face that top spacing issue in iOS 15,
iOS 15 needs some new size of the Launch images
So you please check your all the launch screen images
Check your Attribute inspector is portrait for Launchscreen

iPhone X safe area size [duplicate]

Running my App in the iPhone X Simulator (GM Seed) I am noticing two strange effects:
the App does not use the full screen space (top and bottom area is black)
a strange white bar beneath the title bar
Does anybody know what is happening here and how to resolve this? I can't find any new settings in Interface Builder.
When using launch images (instead of the much easier Launch screen file), you need to provide the properly sized launch image for each device size you wish to support. Once you add the additional launch image, your app should take advantage of the new screen size.
The new iPhone X requires a launch image sized at 1125px × 2436px which is a 3x image for 375pt × 812pt.
Of course if you switch over to using a Launch screen file instead of individual launch images, your app will automatically adapt to all device sizes without any additional work.
I have figured out this issues in iPhone X. Launch image size (1125*2436px)
Please flow this below steps.
1.i)Choose your project name in Xcode.
ii)Select your project target
iii)Then select Launch images source
You can get Migrate popup
i) Choose Assets
ii)Select Migrate
After that select your Assets.xcassets in your project
Then select Launch image in assets
i)Then select attribute inspector
finally check your Launch image source. you can see set Launch image.
iPhone X needs different launch image sized 1125px x 2436px (375pt x 812pt #3x).
Check human interface guidelines for more details.
I have figured out how to fix (though I still don't understand why this happened only on iPhone X) LaunchScreen storyboard on iPhone X with seeing black top&bottom bars.
I have LaunchScreen storyboard with one UIImageView.
UIImageView's top&bottom has to be pinned to SuperView's top&bottom. NOT to SafeArea.
I fixed it by simply inserting some random text in the Lanch Screen File textfield. I dont even have a Launch Screen File... XCode is so buggy.
update
Although this fixes it in simulator (still very weird and unexpected) when uploading a binary to iTunes Connect it will fail due to not finding a LanchScreen file of name "random-name"
Just ran into this while trying to update an app I hadn't worked on in a while.
On Xcode 9.4, I was able to fix this by doing the following:
Add a launch screen by going to File -> New -> File... -> Launch Screen
Make sure the newly added launch screen storyboard is selected as the launch screen file under project settings.
If you already have a 1125px × 2436px launch image but the app is still not using the full screen check to make sure that your image is PNG.
if you removed LaunchScreen.storyboard; Choose your project, select your project target, General -> App Icons and Launch Images -> Launch Screen File: Select here Main.storyboard instead of LaunchScreen.storyboard
Just had this problem... When I selected the project & the correct target I had a blank for the 'launch screen file' under the app icons and launch screen images tab. I set it to the default LaunchScreen and the resizing issue I faced was taken care of.
You may check in project target launch screen file is not set to empty if it is empty it may cause problem.
Yes me too face that top spacing issue in iOS 15,
iOS 15 needs some new size of the Launch images
So you please check your all the launch screen images
Check your Attribute inspector is portrait for Launchscreen

stretch old iOS app on iPhone6 Plus screen

I have a very old xcode/objective-c iOS project.
I tried to compile it on the lastest Xcode version and it works fine.
On big iPhones, the application is streched to fit in bigger screen.
I tried to create a new Xcode projet and drag all my source files in the new project. I removed storyboard.
It works, but the application is not stretched. I see 2 black bands at the top and the bottom of the screen.
What i want is just to understand which parameter i have to changed in the project.
This is not a storyboard or size classes issue because i have no storyboard or xib files. I tried to change iOS version déployment target.
Thanks
You need to add a launch image for the large screen size of the plus models or better a launch screen file.
See: here
Add launch images of of accurate sizes as follows for iOS 8 and later.
Goto launchScreen in the XCAssets, you can see these options on the right pane see the image attached.
and add images with size :-
Image type Size
Retina HD 5.5″ 1242 × 2208 pixels
Retina HD 4.7″ 750 × 1334 pixels

Window size small on iPhone 5/6

I have having ass issue with an iOS8 app, I use auto layout but not size classes in my storyboard. My app works as expected in iPhone 4s and on iPhone 6+ but when viewed on an iPhone 5/5S/6 the window seems to be the wrong size, I get a black border at the top and bottom of the screen. I have attached a screenshot below. What could cause this? I have never encountered it before..
You are missing the correct size of launch screen for 4" and 4.7" devies. If you have them in your project make sure they are in the list of launch screen in te info.plist. If you are using image assets make sure they are present in the LaunchImage section.

How can I get the Xcode storyboard and the iPhone Retina (3.5-Inch) simulation to use the correct xcassets images?

Weird problem here which may be a bug in Xcode...
Using an Xcode 5.1.1 storyboard with auto layout, I am working on the design of a view controller that contains a full iPhone 4 sized UIImageView that references an xcassets image set. The xcassets image set includes 1x and 2x iPhone 3.5-inch images, and an iPhone 4 R4 image.
Problem 1: Once I set the Image View Image for the UIImageView in the utilities panel using a View Mode of Aspect Fit, the storyboard shows the smaller iPhone 3.5 image with white spaces at the top and the bottom of the view instead of the iPhone 4 image which would fill the entire storyboard representation of the view, as they are the same size since Xcode infers an iPhone 4 sized screen in the storyboard.
Problem 2: If I ignore problem 1 and run the program using the iPhone Retina (4-Inch) simulation, the applications selects the correct image size from xcassets and everything seems fine. However, if I run the simulation using the iPhone Retina (3.5-Inch) simulation, the applications also selects the correct sized image, but pushes the images down and display white space at the top of the page.
Before I start hacking around these problems, I thought I would reach out and see if anyone else has experienced either of these issues. Any help will be greatly appreciated.

Resources