Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

loon3y

macrumors 65816
Original poster
Oct 21, 2011
1,235
126
I know its good when changing form landscape to portrait orientation

but is it good for transitioning from iPhone Storyboard to iPad? the iPhone version is going to be only portrait but the iPad version of my app will support landscape orientation and portrait. (the iPad storyboard is just going to be a bigger version of the app [bigger/more images, bigger tableview, it will not have any split views or multiple tableviews] almost exactly the same)



edit: my boss wants me to use auto layout, but im spending a ridiculous amount of time trying to understand it and use it, time in which i can just adjust everything manually on IB or do some coding

is it really worth it? does it really help transition from iPhone Storyboards to iPad Storyboards?
 
Last edited:

bridgeyman

macrumors member
Mar 16, 2008
42
0
Converting an already-working app to Auto Layout may not be worth it. Luckily, Auto Layout plays nicely with autoresizing masks. Under the hood, it actually translates the autoresizing masks into NSLayoutConstraints, so they mix together well. Just write the new stuff in Auto Layout, and keep the old stuff as-is.

One advantage of converting completely to Auto Layout, even if your app already works, is localization. Some controls may need to get bigger/smaller to contain other languages. When using autoresizing masks, this meant creating a separate xib for each language. With Auto Layout, one only needs one xib.

I helped work on Auto Layout as an intern. If you want to chat one-on-one with questions, you can pm me.
 

ChristianVirtual

macrumors 601
May 10, 2010
4,122
282
日本
Actually I also started with some auto layout recently but it drives me a bit crazy; specially while in XCode and change the layout. While runtime I actually very much like it. Makes modification of layout while device rotation very easy.

I use UICollectionViewCell and Auto Layout. To make life easier for me I made sure to define constraints top-left-focused to be able to change size of cell views. In addition I use a number of embedded views to easier rearrange groups of elements.

But as soon as I change size of surrounding views the content get messed up; random offsets to button of cells etc. very difficult and time consuming to design and correct.
I suppose I do something wrong; is there a good video/tutorial/hint to layout more complex layouts ?
 

ArtOfWarfare

macrumors G3
Nov 26, 2007
9,560
6,059
Actually I also started with some auto layout recently but it drives me a bit crazy; specially while in XCode and change the layout. While runtime I actually very much like it. Makes modification of layout while device rotation very easy.

I use UICollectionViewCell and Auto Layout. To make life easier for me I made sure to define constraints top-left-focused to be able to change size of cell views. In addition I use a number of embedded views to easier rearrange groups of elements.

But as soon as I change size of surrounding views the content get messed up; random offsets to button of cells etc. very difficult and time consuming to design and correct.
I suppose I do something wrong; is there a good video/tutorial/hint to layout more complex layouts ?

Ray Wenderlich suggests not dragging elements anymore, but instead using the Editor menu of Xcode. It's discussed towards the end of this tutorial:

http://www.raywenderlich.com/20881/beginning-auto-layout-part-1-of-2
 

KoolStar

macrumors demi-god
Oct 16, 2006
825
9
Kentucky
In XCode [Redacted] auto layout has gotten the much needed improvements. I tend to use it now for all my apps that I am updating to iOS [Redacted].
 

cledet

macrumors regular
Mar 26, 2012
138
0
San Francisco, CA
In Xcode [Redacted] auto layout has gotten the much needed improvements. I tend to use it now for all my apps that I am updating to iOS [Redacted].

Yeah but it's extremely buggy and crashes Xcode for me. I've been back and forth on adopting Auto Layout with my existing apps. Maybe someday.
 

KoolStar

macrumors demi-god
Oct 16, 2006
825
9
Kentucky
I seem to have pretty good luck i have a few controllers in my storyboards that have upwards of 50 constraints for a number pad and it get slow but not crashing.
 

loon3y

macrumors 65816
Original poster
Oct 21, 2011
1,235
126
I seem to have pretty good luck i have a few controllers in my storyboards that have upwards of 50 constraints for a number pad and it get slow but not crashing.


wow 50 constraints? that'll give me a headache


so auto layout is the way to go huh? its the future?


im assuming apple is going to come out with different sized screens (bigger & smaller iPads/iphones than the ones that are out right now)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.