Bound iPhone App to 3.5 inch Frame in iPhone 5 - ios

Wrote an app for iPhone in 3.5 inch mode, and now - I need to make it work for iPhone 5 (4-inch retina).
I'm getting a little complicated with Auto-layouts and can't seem to make it work. Is there some way I can just bound the app to a 3.5 inch frame on an iPhone 5 in the middle of the screen (not with the ugly white space in the bottom I see now), and in that frame it would work like and iPhone 4?
I know it may not be the optimal solution, but I need to publish the app and for now it will do.
Thank

As the responses indicated - this should not be done.
I fought with the layouts until I made them fit 4 inch screens too. It's the only way to go.

Related

iOS auto layout support for all iphones?

I'm using autolayout storyboards for my ios app which is only for iPhone. When I submit, Apple reject it saying that the app should support iPhone 3.5 inch for ipad view on iphone resolution but making the UI for iPhone 3.5 inch is bit hard.
If I change it to support iPhone 3.5 inch onwards it gives bad view for iphone 5 inch. The contents are not centric there's long space for iphone 5 inch. What are the solutions?
Can I configure the settings to support iPhone 4 onwards?
or else Can I make two storyboards for iPhone 3.5 inch & 5 inches?
Yes, you can make 2 storyboards and switch them, depending on screen height, but why you can't adjust constraints for all iPhones screens? Usually this is possible.
One way for complex layouts - create constraint outlets and change them in code.
Another way - divide design to smaller UIViews, that contains elements, like container and set constraints between them.

How to Support All iPhone Screen Sizes

I have an app in Xcode 6.2 with the storyboard supporting all devices. For some reason, whenever I load the application on the iPhone 6+, or iPhone 4s, or iPad, the screen doesn't take the size of the iPhone/iPad. However, on an iPhone 6, 5s, and 5, the screen takes the full size of the iPhone. Why is this? I am very unfamiliar with sizes and how to properly support all sizes. Right now, I have set the screen sizes in the storyboard for each view controller to 320 x 568. The width is "Compact" and the height is "Any".
If this has anything to do with this, my iPad screen comes out blank. It's just white. Apple recently rejected my external testers app submission due to this.
I have done lots of research on these 2 questions, but I had a hard time understanding anything, as I am new to iOS Development.
To properly handle varying sizes and how that affects your layout you will want to use auto layout. Check out this great tutorial from ray wenderlich to get you started. Once you get started feel free to post more specific questions about any roadblocks you run into. Good luck!
http://www.raywenderlich.com/64392/video-tutorial-beginning-auto-layout
When you want your app to work on any device, ideally you should keep the width and height both set to "Any". You should switch to "Compact" or "Regular" width or height only if you have any requirement specific to a particular device. To understand things in detail read more on Size classes. It is very nicely documented in this Apple developer site.
iphone:
iphone 4- 320x480
iphone 5- 320x568
iphone 6- 375x667
iphone 6plus - 414x736
and also ipad:
ipad mini - 768x1024
ipad air - 768x1024
ipad pro 10.5 - 834x1112
ipad pro 12.9 - 1024x1336

How to set auto-scaling on an app (optimized for iPhone 6's 4.7 inch screen) to fit iPhone 5 and 4's screen?

I have seen old iOS apps auto-scale to fit iPhone 6/6+'s large screen on iOS 8. I have recently developed an app which is optimized to display on iPhone 6's 4.7 inch screen. Apply auto-layouts would be lots of work because a lot of views are created programmatically so I am wondering is it possible to make an app auto-scale to fit smaller screens?
Use auto layout in code
Refactor your code to support different screen sizes
Refactor your code to size views as percentage of screen size

Xcode 6: Storyboards

I loved Xcode 4 when there was two storyboards, one for the iPhone and one for the iPad. There was only one screen size to which was the 3.5 inch which made the layout so much easier. Then Xcode 5 came along and it was different because the iPhone storyboard layout changed for the 3.5 inch screen and the 4 inch screen and it was quite difficult to use. Now Xcode 6 is here and I now only have one Storyboard. I hate it. I cannot get any of my iPhones buttons and labels to line up at all. iPhone 4 inch and 4.7 is fine, but the 3.5 is all off. I have tried all those tricks of resetting the suggested constraints too. So my question is, is there any way to have more than one storyboard? I would really like to have one for the iPhone 3.5 inch, another for the iPhone 4.0 inch, another for the 4.7 inch, one for the 5.5 inch and one for the iPad. I would also like them to all work fine and not interfere with each other and there layout. I am not worried if I have to do everything about 5 times but I would rater spend more time and get the layout correct. So if this is possible I would be extremely happy!
You could try loading the storyboard in your AppDelegate.
Described here: https://stackoverflow.com/a/12553838/866904
Create 2 storyboards and then just load the preferred one in your AppDelegate.

Will iPad2 app work on iPad3?

I am new to iOS,
I seen that iPad 2 has resolution of 1024-by-768 and iPad 3 has resolution of 2048-by-1536 with retina display..
I am sure that iPad 2 app will defiantly work on iPad mini because the resolution is same..
and same case for iPhone,
Do we need to develop separate app for iPhone 5 ? because it has resolution different then other iPhone..
I am sure this is a dumb question that any mildly experienced iOS developer would laugh at but since a simple Google search didn't turn anything up I figured id ask.
Any help will be appriciated.
Will iPad2 app work on iPad3?
Yes, it will. The iPad 3 has exactly twice the pixel density in each direction as the iPad 2, so the OS will just go ahead and "scale up" the graphics (except those which are made from images in the app - you'll have to generate a higher resolution version of these image files for iPad 3).
Do we need to develop separate app for iPhone 5?
Not a separate app, you just have to pay attention to the different screen aspect ratio. If you don't do that, you'll have black bars at the top and the bottom of the screen.
iPhone 4 Apps will work on iPhone 5 :
But it will have black spaces at top and bottom, In order to refactor it you just need to change the splash screen which is suitable for iphone 5.
iPad 2 Apps on iPad3:
It will work without any issues unless they have different iOS versions running in them.
As far as I know, the difference between the iPad2 and iPad3 won't be such a big problem. (unless you want to be really exact)
Whereas you should develop a new App for the iPhone5 because it has a greatly different screen format than the iPads.
Yes, your iPad 2 working app will work on iPad 3 (also, depends on iOS version). Just it will not look good :) In order to make it look good, for all images used for your app, you have to add #2x ones with double size.
As for iPhone 5, no, you don't have to develop different app, just you have to make your views resizable to fit on screen. Good Luck!

Resources