Apple's technote here shows their recommend approach for moving content from beneath the iOS 7 status bar to below it (to avoid overlap). However, this technote seems to assume the use of storyboards. I'm wondering what to do if you have a legacy project that has a "View" in an .xib file... not even with a ViewController in the .xib. Just a view. Because you can't visually add constraints unless there is ALSO a ViewController in the .xib. But adding a ViewController results in an uncaught exception at runtime (see below).
To illustrate, rather than try to post all the sample code I think you might need to see from my project, you can duplicate the issue I'm having by launching XCode 4.6.x and choosing New Project. Choose "Single View project" in the iOS category, and uncheck "Use Storyboards".
After creating the project, click on the .xib file. Add a UIViewController so it, setting the existing view as a child of the ViewController. Select the ViewController, show Utilities, and click on the Identity Inspector. There, type in "ViewController" as your class. (So your new UIViewController uses the existing source code.)
When you run, you'll get this error:
*** Terminating app due to uncaught exception 'UIViewControllerHierarchyInconsistency', reason: 'A view can only be associated with at most one view controller at a time! View > is associated with . Clear this association before associating this view with .'
My Question: Is there any way to add a ViewController to an existing .xib file, so I can add constraints, but not get the runtime exception seen above?
(If you look at the accepted answer here, it seems the answer may be "no"?)