Xcode 6: Storyboards - ios

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.

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.

Views in storyboard do not resize properly on iPhone 6

I've checked a lot of different websites and stackoverflow answers, and I'm still stuck.
I developed an app for iPhone and iPad targeting iOS 7.1. I have two storyboards, one for each device. The app only displays in portrait mode. I cannot seem to get the app to display full screen on the iPhone 6 simulator.
I've tried numerous things, I followed the advice linked here by adding a Launch Screen, setting the iPhone storyboard to auto layout and "use size classes", and . Not only does that not affect the size, but the Launch Screen doesn't seem to scale properly either. If I get it to fit the iPhone 6 it doesn't fit the iPhone 5 properly.
I've tried adding the proper launch images and I don't get any errors saying the wrong image resolution is present.
I've used the storyboard as a Launch Screen described here.
Now, when I switched to "use size classes" I could manually extend the objects in the views to match up with the size of iPhone 6 (I have not tested it for 6s) but that makes it extend past the iPhone 5 boundaries. The only thing I can think of right now is to create another storyboard and detect if it's iPhone 6, but I would really like some other ideas.
Here's what it looks like for iPhone 6:
And here's what it looks like on iPhone 5:
Best advice i can give u is
Use default size class , the classic 600x600 and then use Auto Layout
Or do the reverse, take a 3.5inch size VC and apply Auto Layout on it. Everything will present itself quite perfectly if you can apply the right constraints
Here is a link for an awesome Autolayout tutorial

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

Modifying an existing 4-inch storyboard to work on a 3.5-inch screen [duplicate]

This question already has answers here:
Supporting Multiple Screen Sizes in Storyboards (3.5 and 4 inch screens)
(2 answers)
Closed 9 years ago.
I am programming an application (my first) for iOS 7 using Xcode 5.0.2, and I think I may have made a mistake in designing the story boards on the 4-inch display first, because I want my application to work on both the 3.5 and 4-inch display.
Do I have to create a new story board for the 3.5 inch, or can I use auto layout to configure what I already have? If I can, how do I configure it? I've used auto layout before, but not to support different screen sizes, only for changing from portrait to landscape.
If I have to create a new storyboard, do I have to create new classes for those or can I somehow link to the code I've written?
Autolayout is designed for just this sort of thing. If you have set it up for changing between portrait and landscape, it should Just Work when changing between 3.5 and 4 inches. If not, please post a more specific question!
If you are using storyboard, as #hatfinch mentioned it will work out of the box. You might have to go modify your constraints to make sure it look okay on 3.5 inch screen.
You can see how your views will look like in 3.5 inch by following ::
Select your storyboard.
From Editor menu, select " Apply Retina 3.5-inch Form Factor".

Resources