Black bar appears on top when running on iPhone 6 & iPad Pro Simulator - ios

When I run my game on the simulator, specifically on iPhone 6 and iPad Pro, it shows black bar on top of the screen. I have looked the answer up online and have literally tried every single thing and have went through all the answers, but none have worked. My deployment is set to 7.0 and have tried running with setting just set to LaunchImage from asset folder and LaunchImage & LaunchScreen.xib combined. I also do have the right size pictures required in asset including iPhone Retina 4, as well, and that doesn't fix the problem either. Is this just a glitch on the simulator or there is a way around this?

I got it working. For some reason my 2x images were short for the screen size, and had to extend them more. Even though height wise, my images had more length than the screen size.
Hope this helps people. I came across several people who had done everthing right, but still couldn't get it working. I believe it is because image isn't large enough to cover the whole screen

Stretched mode?
Are you providing Default screens in all sizes as suggested in:
Dealing with iPhone 6/6+ startup images
How to Update Your Apps for the 4-Inch iPhone 5 Display
Restoring integrity in Startup screens
Images clipped?
If not running in stretched mode, pick a View Mode best suited for your images, such as Aspect Fill and Scale to Fill, both of which will cover your UIImageView in LaunchScreen.storyboard.

Add Default-568h#2x.png Image with resolution 640x1136.
Make sure 'App Icons and Launch Images' look like below image:
it worked in simulator with iOS 9.

Related

image view only shows background color in launch screen

I'm having some problems with my app's launch screen storyboard.
When I run the app on an iPhone 5S, the image is displayed. However, when I run the app on an iPhone 8, the background color of the UIImageView is shown.
In the project settings, at App Icons and Launch Images, I am not using an image source (although trying do so doesn't seem to work either) and the Launch Screen File is set to LaunchScreen.
The View Controller has Is Initial View Controller checked and the file has Use as Launch Screen checked. The image set was brought in using Import... and is universal.
I've read through several of the solutions for black screen here, but switching the background color revealed that was where my black screen was coming from.
In the assets file, the image set has 1x # 640x1136, 2x # 1242x2208 & 3x # 1125x2436. I experimented with other combinations, but this is the first set that let me see the actual image on the 5S. I'm pretty sure the issue is not having the right configuration of dimensions in the image set file, but can't be certain.
Any help would be much appreciated. Thanks in advance.
Had the same thing. Working on the simulator but didn't work on the device (or any other possible option). It's just a bug.
Try these until it works:
Turn simulator/device off and then on again.
Hard clean simulator. Turn it off.
Clean/Hard Clean/Delete Derived data
Reboot Xcode
Hope one of these helps.
If not, please include the screenshots of working / non-working app screens.

ImageView Scaling for iPhone 6 and 6+

So Im making a game without the use of auto-layout. I have used constraints to scale everything and it worked perfectly. However, there are 12 image views that scroll down. 6 on the right a 6 on the left.
This is done based on a code i've written and places the images via arc4random.
The images on the left are completely fine and scroll down so that there is no gap between the side of the screen and the image. As do the images on the right when using the iphone 4s and 5.
HOWEVER.. when it comes to trying this on the iphone 6 and 6+, alot of the times, there is a gap between the image and the side of the screen on the RIGHT. the LEFT is fine. I want to know how I could solve this issue. This is more of a general problem so dont need to include code.
You can try disabling iPhone6 and iPhone6 Plus support for the app so that they work fine on the new devices (via scaling)
Remove "Launch Screen File" from Target General Settings and if you are using Asset Catalogs for Launch images, under right panel for the asset catalog under Launch Images-> remove launch images for iPhone Portrait and Landscape for the category 'iOS 8.0 and later'
This is a workaround that makes iPhone6 and iPhone6Plus to scale views according to the screen size.

Strange iPhone5 letterboxing

I have just installed Xcode 4.6.3 to test my OpenGL game (which was developed in Xcode 3) on Retina 4" simulator, and I have got two black bars on the screen's top and bottom.
I have added a Default-568h#2x.png image file with dimension of 640x1136 to my project, when I am testing on the iphone simulator, the Default image is displayed correctly with no bars at all, but once the game starts, the top bar is moved to the bottom of the screen, now I have a sum of two bars at the bottom and no bar at all at the top.
I have done some google search but it seems no one had the same problem before, I am getting this result on the iPhone simulator and have got no iphone5 to confirm this would happen in real device...
I would really appreciate someone could help on this.
Thank you.
I was having a similar problem and the solution I found was to stop using the asset catalog for the Launch Images. That allowed it to revert to using the properly named files it was looking for.

iPhone 6 - app does not fill screen

Most of my apps scale up when run on an iPhone 6, but for some reason one of my apps looks like this:
What would cause it to not just scale up and fill the screen?
EDIT: Here are some repro steps:
Create a new project (Single View). Turn off size classes and just use iPhone.
Make the background orange.
Add a yellow UIView subview at (20,20,280,200).
In Xcode you get this:
Now simulate on iPhone 6. You get this:
Why doesn't it just scale up and look normal?
Not sure why this is getting downvoted. It's a legitimate question. And here's the legitimate answer:
Remove the "Launch Screen File" in Projects > General. Xcode 5 did not have this so older apps scale up automatically. Apps created with Xcode 6 get a default Launch Screen file created.
Removing it will make your app scale up on iPhone 6.
I have got the same problem and I managed to solve it by adding constraints to my ViewController in the storyboard.
Make sure that you clicked the ViewController of your scene. They yellow button in the this screenshot.
Click Editor-> Resolve Auto Layout issues -> Add Missing Constraints
Now you will find that the background image is scaled up to fill iPhone 6 or iPhone 6 plus.
Note that this solution works for me even if I did not provide any launch screen file.
I had the same issue. Searching for an answer, most of them mention the launch image. To me, what did the trick, was that I first enabled launch image for iOS8.0 and later in Xcode, which requires the native resolution sizes for 4.7" and 5.5". Adding these sizes didn't help, but when I re-disabled them, it started working!
If you do have any launch image, you will need launch images for all appropriate sizes. I was doing a minor update to an app, and it was not showing correctly on the iPhone 6 simulator. I created four launch images (.png files). Since the app should still run on iOS 7, I apparently could not use an asset catalog. I gave the images the correct names, and all is good.
Image sizes and names may be found here:
Sizes and Naming of Launch Image for iPhone app in iOS8

Cant remove two horizontal black bars on iPhone 4 app

I am developing an application for iOS with Xamarin Studio and when I try the app out on my iPhone and in the simulator, there are two horizontal bars at the top and bottom when the device is tilted in landscape orientation. I've seen some people have said that you need to add a launch image and name it Default-568h#2x, but that doesn't solve my problem.
Also I tried deleting and resetting content on the simulator and cleaned my project. Usually I see posts about the iPhone5 letter-boxing causing problem for some people, but for me it's the iPhone4 and 4s which is causing the problem. Anyone have any other ideas on what might be the problem?
You're using the iPhone 4 simulator. The image is being resized with fixed aspect, thus the letterboxing. Did you include a 640x960 Default#2x.png launch image?

Resources