ios app not fitting iphone 5 screen - ios

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.

Related

UIView shows perfect on iPhone but not on iPad

I am pretty new to iOS development and I am able to create views and controllers. I have been testing using my iPhone and other sizes of iPhone and they look great. I tried once on an iPad but it was a border around the screen like in this image.
I constrained to margins and I did not give any height or width constraints so it could stretch properly. It also looks good on the storyboard viewing so what could I be doing wrong? Can't seem to find any resource online to help.
This is default behaviour when you run iphone app in ipad
This happened because your app is supported iphone only .
Tap on your project and select universal if you want to add support for both iphone and ipad.
Other option is you can check requires full screen check box but it will still show black bar
Note: However you are developing iPhone Only app but it is compulsory to check that everything works fine in ipad because apple review team will also check that in ipad and your app may be rejected if something is not proper
May be you have made an iPhone app. Try to change the setting to Universal app in the xcode settings. Normally iPhone app shows scaled on iPad, which is same as in your case.
Select Projet in xcode -> General Setting

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.

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?

Storyboard designed for iOS7 not going fullscreen on iOS 6 on 4 inch device

I am designing my iPhone app using storyboard and auto-layout. Everything works fine in iOS 7 on both 4 inches and 3,5 inches device.
On iOS 6.1 the app runs like is always on 3,5 inches device, even if is running on a 4 inches device, the black bars on top and bottom appears.
screenshot on the simulator:
Anyone with the same issue? how can i solve this problem?
I think are you Forget to adding splash screen Default-568h#2x.png in to you Project please check Property and set required splash-screen Default-568h#2x.png (640 × 1136 pixels)
Ones you add this image in to you working Project, Remove old Build from device or Simulatore, clear Project and re build and check Hope you issue will solve.
Yes, i'm agree with Nitin. In XCode 5 just create e new LaunchImage Set and add the standard, retina and R4 image in both iOS version (5,6 and 7).
Remember to set this set as default in your project info.
A quick fix is to replace Launch Images with your Storyboard.
In Xcode, go to Target > General, and then:

Resources