Anthony Shintoluggenprog Anthony Shintoluggenprog - 23 days ago 7
iOS Question

How to convert Xib based project to Storyboard with auto layout

I'm going to get heat for posting this question that has probably been answered multiple times before, but I wanted to get a new understanding on how to incorporate Storyboards and auto layout into my app.

The whole thing is done, but I've used countless Xib files that don't even have a proper view layout to them. Everything related to image position and size is done through hard-coding

CGRect(x,y,w,h)
frames. I'm not using auto layout, and my Xib files are not populated with proper views (just temporary views to provide the
IBOutlet
connections).

What do I start with first? Auto layout or transfer everything to Storyboard? What documents/guides can I read to help me with this?

I'm using Xcode 7.1.2, and iOS 8.1.

Answer

All the Xibs needs to converted to Storyboards first, so that the entire app has all its Screen is reflected in the Storyboard. Once this is done you should start implementing the Autolayout, by removing the hardcoding from the code and managing them via the StoryBoard scenes.

Comments