How to use autolayout, to make compatible for iPhone 4 and iPhone 5 both? - ios

I have custom upside tab bar and using storyboards. I have followed this tutorial custom tab bar
This tutorial explains about side tabBar and I am using upside tabBar with same approach. I am using autolayout and need to make compatible for iPhone 4 and iPhone 5 both. When I design in 4 inch screen, it runs good for iPhone 5 and for iPhone 4, it cuts bottom 88 pixels(difference in iPhone 4 and iPhone 5), and if I design for 3.5 inch screen, it is good for iPhone 4 and shows blank space for bottom 88 pixels.
Actually I am newbie for autolayout and how can I implement this for my project?
Thanks in advance for any help.
This is design for iPhone 5
but it looks like this, when runs on 3.5 inch screen

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.

iOS Autolayout not working for iphone 6

I'm having real trouble here for some time. I'm not using size classes (app is for os 6 +). I'm using auto layout, I don't want to have multiple storyboards for each screen size. For 3.5 and 4 inch screen everything is ok. For 4.7 + inch it's not. So to show you what is the problem. This is for 3.5 and 4 inch screen:
This is 4.7 inch screen:
As you see, right arrow goes to the left. It has Vertical Center in container and its height is 28x28. It has right constraint 8 points like this (I've unchecked Constrains to margin):
I cannot make it work for iPhone 6 and iPhone 6 plus. What am I doing wrong here?

Autolayout for iphone 6 and iphone 6 plus

I have been try a good solution for this problem... I have an app and this work perfect in iphone 4, and iphone 5, But in iphone 6 and 6 plus i don't know how made a good solution with autolayout.
the problem is: my app is a clone of a home screen, and i need that all the icons have the same position in all devices
I don't know how to let the space between the icons flexible
iphone 4 and 5
for iphone 6 should look like, but if it works for one does not work in another
Thanks

Bound iPhone App to 3.5 inch Frame in iPhone 5

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.

iOS make universal app for iPhone 4 and 5

Quick question. For iOS in Xcode I want to make an app that looks good on the iPhone 5 and the iPhone 4. I am using story boards. All I know is when you click the button on the bottom of the storyboard page with the two arrows on both sides of an iPhone it changes the views of the app from 4 inch to 3.5 or vise versa. This usually makes it look messed up because if I made the app with an iPhone 5 screen it looks weird on the iPhone 4 screen. Preferably without using code and just using storyboards, how do I make an app that is universal for the iPhone 4 and the iPhone 5. Basically like making an app universal for the iPhone and iPad where there are 2 storyboards (one for the iPhone and one for the iPad) how do I do that for the iPhone 4 and iPhone 5 (one story board for the 4 inch screen and one for the 3.5 inch screen)?
Thank you
Use autolayouts to format your views.
Those arrows are only to simulate the view. They are not view holders.
Check: https://developer.apple.com/library/ios/documentation/userexperience/conceptual/AutolayoutPG/Introduction/Introduction.html

Resources