Eject

from Interface Builder

Generate swift code to replace your .xibs
Stop using Interface Builder when it stops being helpful.

Drop a .xib file here to give it a shot

Processing
There was an error! Please log an Issue
Constraint Style:



Why?

One common pain point with Interface Builder is that as a view becomes more dynamic and is managed more programatically, Interface Builder becomes less helpful. This tool lets developers use Interface Builder without that concern, giving them an Eject button to hit when Interace Builder starts getting in the way, and provides an easy path to transition to full programatic view layout.

Does it work?

Eject should be considered Alpha quality, but it supports the majority of UIKit. If Eject encounters something in the .xib file it does not understand, it will generate a warning. If you encounter any warnings, please log an Issue. The issue page will also list all known missing features.

Although Eject aims to generate perfect code out of the box, there are still a few bugs that need to be resolved. There's a good chance that there will be a few small compile errors you will need to fix. Usually this involves moving an assignment into the constructor. There may also be a few bugs with the generated code that will cause runtime errors, but Eject should do the majority of the busy work.

Eject uses the user labels for variable names. It will warn you if duplicate variable names are found, and will suffix them with a number to make sure the code compiles.

Eject does not generate any container class code. It's expected to be copied and pasted into loadView, or your cell initializer. I'd like to be more helpful here, I'm just not sure how. Send me an email or message @KingOfBrian if you have thoughts

Eject does not aim to support Storyboards or TraitCollections for Version 1. It shouldn't be hard technically, but I'm not sure how to generate good code for trait collections, static cells or segues.

Can I run Eject locally?

Eject is also a Mac OSX CLI tool. It's available on Github. The README contains more information for running on the command line.

How does it run on the Web?

This website is hosted on heroku, inside a simple Vapor application Eject Assist. If you're interested in writing some vapor code, check out the issue list!