Closed BrianSemiglia closed 7 years ago
Hey Brian! I am looking into allowing configuration of the structure of the code beyond 1 giant method. This should allow you to structure configuration methods like you have above, with one method for all of the top level views. This will probably be with a better interface on the Reference
object and a .stencil
file, similar to what SwiftGen uses.
The pattern you state is a bit tricky though, as there is idempotent configuration, and additive configuration (adding subviews) and the approach above would require them to be all idempotent. There are ways around this, but would require a few extra moving parts than what Eject provides.
Also, I'm not sure that Eject will mature enough into a tool that could be used in the build system (IE: Using eject to enhance IB usage, not replace IB usage). I'd love to say it would be, but the current goal is to help users transition xib files out of IB, so your milage may vary!
Just a thought but what if, as a user, I could:
Code like this:
would become...
Pros
Cons