0

How can i handle Layout in IOS5 as well as IOS6.Previously i have developed my application in IOS5.Now i am facing problem of layout (3.5 and 4 inch). i have done ot of of r & d and found that we can solve it using constraints but i don't understand concept of constraints. Can any one help me to do so without using two xibs? i found this link

How do I move ahead, but at the same time provide backwards compatibility? Any suggestions would be great.

mshau
  • 503
  • 4
  • 19

1 Answers1

2

Don't use AutoLayout because your iOS5 users won't even be able to run your app. Keep "Use Autolayout" unchecked in Interface Builder. Instead, use springs and struts in IB or your views' autoresizingMask property in code.

John Estropia
  • 17,460
  • 4
  • 46
  • 50
  • Do you have any code or reference link to set autoresizingMask through code or xib ? – mshau Oct 05 '12 at 08:51
  • Here's a good summary from another stackoverflow question: http://stackoverflow.com/questions/10468389/uiview-autoresizingmask-interface-builder-to-code-programmatically-create-st – John Estropia Oct 05 '12 at 08:58
  • The answer would be even nicer with some code. Also it would get an up-vote from me ;-) As it is now it is not a complete answer. – Johan Karlsson Dec 13 '12 at 09:40
  • @JohanKarlsson The question was specifically about AutoLayout in *xib files*, so there is no sample code. I already linked another thread if you do want to do it in code. – John Estropia Dec 13 '12 at 11:21
  • @erurainon Sorry I missed that part (>//<) – Johan Karlsson Dec 14 '12 at 08:52