inferred iPhone size not adequate - iphone

I am trying to develop for the iPhone 6 and I have an issue here that has been discussed on S.O. before, but the solution that developers have offered is not working for me.
I have taken a few pictures to try to show better what is happening.
This first screenshot is just to show that I have my Launch Images loaded:
The next picture:
Shows at the left the storyboard. As you can see the image fits the screen. The size on the inspector is "inferred" and the dimensions of it I can check by looking the size inspector:
They are 320 by 564 which corresponds to the iPhone 5s.
On the simulator as you can see there is a white gap around. and the picture at the right is a screenshot from the device running the same thing.
So to recap, i want to make an app for the iPhone 6 but on the storyboard the "inferred" dimensions are those of the iPhone 5. The simulator displays an iPhone 6 but with an image that doesn't fit and the device -weirdly- displays the image correctly.
On the next picture I have changed "Inferred" to iPhone 4.7-inch:
And I have also resized the image to fit the bigger scene on the storyboard, its now 375 by 667:
So, the normal size for an iPhone 6.
As you can see, the simulator now shows the display correctly but the device (screenshot on the right) is not correct as the image is now too big for the screen (there is no white space around the "E").
I have researched this and everyone seems to say that loading the launch images makes xCode display correctly for the iPhone 6, but that's not happening here. So what else am I missing? Thanks.

Related

Why does iPhone app resize for iPad but not iPhone 5

Why do original iPhone applications (normal screen size like iPhone 4/4s) in Xcode resize perfectly for iPad automatically and not for the slightly larger iPhone 5 screen size?
To fit a iPhone 4 view into the iPad each point is scaled equally into two directions. The aspect ratio of a iPhone4-point doesn't change on the iPad screen.
To fit a iPhone 4 view onto the iPhone 5 screen, each point has to be scaled in vertical direction only. This will distort each point and the view, similar to the distortions you get when you watch a movie in the wrong aspect ratio. A circle on the iPhone 4 screen won't be a circle on the iPhone 5. So you can't physically resize the pixels like it's done on the iPad.
In iOS-Development Autoresizing Masks come to the rescue. But there is no way to figure out if your app looks good if the auto resizing scales the view to iPhone 5 size. You have to test each app on a iPhone 5 sized screen. Apple didn't want to do this, so they put an opt-in in place, which you actively had to enable. They choose to use the iPhone5 launch image for that.
If your app looks good when it's vertically scaled simply provide the appropriate launch image.
If you used best practices to develop your iPhone 4 app that's basically all that is needed.
iPhone 5 support needs to be explicitly added by supplying a "Default-568h" start image.

App runs on iphone 5 like iphone 4

I have finally done to build Augmented Reality app.
The app works great for iphone 4 screen size Width :480 Height :320.
During the development I have also test the simulator to see launch goes well for 4 inch display (iphone 5), and it did go well the splash screen show was the 4 inch png named : Default-568h#2x.png and the screen shows a white background fully (like it should).
When I launch the app on a real iphone 5 device, the 3.5 inch splash screen loaded and the app load like it loads on iphone 4. Everything in the middle and I get a little black equal Margins from the side, the cable is original and this is the Weirdest thing ever happened to me.
UPDATE : i have also tried to add this code on the simulator and to the real device :
CGRect bounds = [[UIScreen mainScreen]bounds];
NSLog(#"%#",NSStringFromCGRect(bounds));
the simulator prints iphone 5 screen size, the real device prints iphone 4 size.
Any help please
Make sure you have all three Launch images set up correctly. :)
Make sure the image has been added to the target.
=> If you select your image file in the Project Navigator (left pane) the Utilities pane (right pane) should have a checkmark under 'Target Membership' next to your target.
I think that your views need to resize. You may need to include some code that detects what device the person is using and resizes the view. Just a suggestion.

iOS startup screen image zooming in?

I'm getting my app ready to submit to the app store and have been reading the guidelines on the startup screen. It seems apple prefer it to be something that makes it look like your app is already loaded even when it isn't.
I decided to use the background image of my app as the startup screen. That way the skeleton of the app will be there and the buttons and text will load in.
I used a copy of the image but renamed it to Default-568h#2x.png.
It works but when it launches, it has that default zoom affect but it seems to zoom in bigger than the actual image size and so doesn't transition nicely into the app.
Any ideas why this happens and what I can do?
Thanks
On the iPhone, the default.png image should contain the status bar (if it is visible in your app).
On the iPad, the status bar shall be left out.
Thus, the default image size should be (source):
This could be an issue with the status bar being included or excluded in the Default images. According to apple all the iPhone Default.pngs should have the status bars included while iPad should have the status bar left out. (Unless of course your application hides the status bar)
OK, I found a way around this.
I found out that the status bar at the top is 40 pixels for retina and 20 for non retina.
I then created a black background in the size of the full iphone 5 resolution. I then got my startup image (actually the background for my app) but resized it down 40 pixels vertically.
I then put this on top of the black background I created and lined up the bottom.
I then merged the layers and used this as the startup image. It worked perfectly, the startup image loads up and then my app opens up right on top of it perfectly aligned.

Default picture for iPhone 4

How shall I manage to make a default image for my iphone application that is large enough for the Retina screen? The screenshots I take with the Organizer in XCode is 320px x 480px, however how can I manage to get a screenshot twice as large? It is just a picture of the UINavigationBar, empty area in the middle and a UITabBar at the bottom with all content removed.
Thanks in advance.
To take a simulator screenshot, use Ctrl+Apple+C. Then paste the image into Preview (menu/File/New from clipboard) and save. That will give you just the screen, sans the iPhoney window border. If you want one with the border, use Grabber.
For a Retina emulator, set the simulator to iPhone 4 mode. Menu/Hardware/Device/iPhone (Retina). Just tried - it works.
The easiest way is to run the app on a retina device and press both buttons at the same time to take a screenshot.
However, if you don't have access to a retina device, there is a great FREE program here: http://www.curioustimes.de/iphonesimulatorcropper/ that can take screenshots directly from the simulator. For Retina images make sure your simulator is set to iPhone 4 and that your screen resolution is set high enough to display it in Retina.
I appreciate the help, however I do not have a Mac/PC that has the resolution that I need to display the iPhone 4 simulator properly(high resolution, apparently). If you have, the answers given is perfect, however my solution was to download this:
http://www.teehanlax.com/blog/2010/08/12/iphone-4-gui-psd-retina-display/
and then resize components to 640px x 960px (minus the statusbar).

App running on iPhone 4 has a 320x480 resolution instead of 640x960

I'm creating an iPhone app, which will run on iPhone 3 and iPhone 4.
To that point, I was trying to make the images adjust to the resolution, but it turns out that even when running on the iPhone 4, the size of my window is 320x480.
On the XIB I specified "fullscreen at launch" and for the ViewController I even specified "Wants fullscreen", but I can never get it to recognise the actual resolution.
Am I missing something?
Is it running full screen on your iPhone 4? (I don't mean what resolution is being reported, I mean are there black bars around the app - I bet there aren't).
iOS is 'magical' in that you just deal with iPhone 3 size things i.e. xibs etc and it scales it correctly for you on the iPhone 4. You will always see the smaller resolution when you query the display.
To get images to load the correct resolution just create two versions i.e.
myImage.png
myImage#2x.png
Make the second one exactly twice the size of the first and the iPhone will do the rest.
PS There's a property that's been added to UIImageView called scale - it's how the iPhone knows how large to render an image - have a look at the docs here.