Why does iPhone app resize for iPad but not iPhone 5 - iphone

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.

Related

background images are grainy and slow with iOS 8, iphone 5s

My client asked me to put a bunch of random background images on his iPhone app. So it's set up by putting a UIImageView on top of self.view, adding an FXBlurView on top of that (for blurring purposes, obviously), then putting a UIScrollView on top of THAT, and laying translucent UIViews containing control objects on top of all of it. it looks something like the yahoo weather app when all is said and done. my question is twofold. now that i've explained the situation, here are my two questions:
Question 1
the background images are very grainy. what size should they be for an iphone 5? and what size for an iPhone 6? i thought retina was 640x1136, which should be the minimum size right? why is it only showing the entire image for 320x568? from what i've read, they should be the following for a 5s:
320 x 568
640 x 1136
960 x 1704
when i do that, they appear very grainy. if i do any larger than that then the pictures are cut off. the whole picture isn't being shown.
Question 2
In iOS 7, the app ran fantastically. now that iOS 8 is out, the scrolling graphics are slow and choppy. I took the background image out completely and it sped right back up. I'm wondering what i can do to speed the scrolling up again with a background image staying stationery while the control objects scroll.
any ideas for me?
Answer to the first question
apple has you design your apps at 320x568. The extra pixels are used to make the text and images look sharper. Otherwise, everything would be smaller on a retina display and not sharper.
So you don't have direct control over that extra retina space. The iPhone uses it to digitally make the images sharper and clearer.
I'd still like to know why its choppy and the graphics are poor while scrolling
I use FXBlurView as well, and found that turning the dynamic option of the blur view to OFF fixes the issue. For some reason on iOS 8 FXBlurView uses 100% CPU when dynamic is ON.

iPhone 5 app compatibility, Is it mandatory to change all the images?

I want to make my App compatible for iPhone 5, i got the point about auto resizing just need to confir, Do i need to add all the images re-sized for iPhone 5 OR can work with re-sizeing only Splash and Background image ?
You will be required to resize the launch images. You need a launch image for the older iPhone screen sizes in normal and retina resolutions as well as an iPhone 5 screen size retina image.
It will be a good idea to rework your app and have background images that can take advantage of the larger iPhone 5 screen size, but will be able to be cropped and still work on the older iPhone screens.
Using either auto layout or setting the resize and pinning struts properly, your other controls and images should be able to be used as they are to adapt your app to look good on the iPhone 5 screen.
You only need to resize the splash screen.

Xcode iPhone 4/5 Screen Size Both

I am making an application in Xcode, and I need to make it for both iPhone 4 and 5. But since the iPhone 5 has a bigger screen, it messes my application up.
Once I place the labels for the size of iPhone 4 and then test it on the iPhone 5 the labels are all misplaced. Is there a way to make them stay?
You can use iOS 6's new autolayout feature (if you want to be iOS5-compatible, you can still have autoresizing masks).
You need to position your labels based on the View Height of the device(don't have to worry about width, since iPhone 4 and 5 both have the same width. But this would apply for a universal app targeting iPad and iPhone).
For instance, if yours is a View Based Application, find the view height of the superview using self.view.frame.size.height, and determine all label/view placements based on this property.
And test for both screen sizes on the iOS Simulator.

iPhone design resolution in Photoshop

I am wondering about how to change the design in photoshop for the new iPhone 5.
Usually I create design/background for iPhone in Photoshop, with resolution 640x960 for retina. Since the retina resolution is propotional to the older ones I can just reduce to 320x480.
But what about the iPhone 5. The Screen is higher. I'ts a new resolution ( 1136 x 640 )
What is the best solution for photoshop design to display on iphone4s< and iPohne 5?
How can I handle that without creating a new design?
And how can I tell the app just to use it if it's the iPhone 5?
(I am using PhoneGap/Cordova)
You can create an original design using 960x640. Then you can just add a different layer positioning your elements for the 1136x640 resolution. When exporting, hide the tall layer if you want to target iPhones < 5. When targeting the iPhone 5, just have your layer as a top view, and you can change the artboard on the fly.
Also, iOS 6 won't automatically target iPhone 5 images (except Default). So if you want to use different images you would have to check yourself for the height.
Basically, if your screenSize.height == 568, you're using an iPhone 5.

What resolution should I make my image backgrounds for my universal iOS app so that it supports the Retina display?

I have a universal iOS app with a custom view that has three buttons, each with an image background that extends to the sides of the screen for each orientation (portrait and landscape). The heights of each of the three buttons are the same and all three buttons take up the whole screen. So it looks simliar to this layout (image on the far right).
Since the widths and heights of each button are the same, I need to calculate how big (in pixels) I need to make each button image in order to support both orientations of the iPad and iPhone. On top of that, I also need to create higher res images to support the new Retina display. My questions are...
How do I calculate the resolution these images need to be for...
iPad in both portrait and landscape mode
iPhone in both portrait and landscape mode
iPhone with Retina display
Instead of having two sets of images to support both Retina and non-Retina displays, can I just use one hi-res set that will be scaled down to the non-retina displays? if so, is this a good idea?
If I add a navigation controller and/or a toolbar, what are the heights of these two view objects so I can adjust the heights of my images?
Thanks so much in advance for all your help! I'm going to continue searching for these answers right now.
Good info on porting apps / graphics to retina display is here
Essentially Apple created a new unit for graphics called "points" and if you add additional images to the bundle and use new API you can automagically load one or the other image.