Cant remove two horizontal black bars on iPhone 4 app - ios

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?

Related

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

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.

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.

See all of iOS 7 simulator in Xcode 5 on non-retina Macbook

I am trying to test an app in the simulator (3.5 retina iPhone) and am running into a bit of an annoyance. I can't see the bottom 10th of the screen...
I have tried the Cmd+3 shortcut but unfortunately that part of the screen is still missing. For example, the card should be in the middle of the screen below:
For this app, I have some components at the bottom of the screen that I can't see in the simulator. For now, I'm having to move the components further up the screen so that I can test them but it isn't ideal.
Has anyone else encountered this issue?
I think you have designed your view for the 4 inch display, and have not set up autolayout/springs and struts to layout your view correctly.

ios app not fitting iphone 5 screen

My ios app does not fit on iphone 5 screen. When I run the app, I can see blank space at the top and bottom of the screen. I have made the app compatible for both iphone sizes. But Since I have updated to the latest xcode, I am facing this issue. See screen shot. Can any one please help?
You probably may not have set your Default-568h image.
On the simulator make sure you have set to iPhone (Retina 4-inch).
You can do this by going simulator menu at the top go to Hardware->Device->iPhone (Retina 4-inch) that will change the phone simulator to the iPhone 5 version.
click here for more get information for naming convention of images [here]Naming convention for iPhone 5 images? [here]
Try setting AutoresizingMask to your container views instead of assigning appFrame.
I have faced the same problem while moving to iOS 7.
Solution comes with AutoresizingMask. iOS 7 has full Screen layout for ViewControllers.

Resources