Skip to content

Instantly share code, notes, and snippets.

@MarcoPolo
Created March 18, 2015 23:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MarcoPolo/ffdc95b2455104676941 to your computer and use it in GitHub Desktop.
Save MarcoPolo/ffdc95b2455104676941 to your computer and use it in GitHub Desktop.
Shit ios devs say

On putting an .xib into storyboard

Add a new UIViewController to the storyboard. Remove its main view so that the view controller is empty. Set the Class of the view controller (in the Identity Inspector) to that of your nib's File's Owner. Also make sure the .h and .m files are added to your project already.

Now open the nib, select the top-most view and press Cmd-C to copy it to the clipboard. Switch to the storyboard, select that new, empty view controller. Press Cmd-V to paste the contents of the nib into this view controller.

You may have to reconnect all the outlets and actions, but at least you don't have to do the layout again. :-)

from

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment