LayoutCode supports code generation for iOS Swift. To show Code Generation window, click Code Generator button at Toolbar at top right of the app.
Code generator supports generate multiple files generation.Under the hood, artboards data from workspace are processed by code generator to produce readable and manageable code. The generated code then can be used or modified by a developer depend on their needs. Here are explanation of file category on the left Code Generator window.
- Artboards: Generate code for all artboards at Main tab. Each artboard generate a UIViewController file
- ShapeView: A fixed file that act as container for CAShapelayer to support layout constraint.
- Collection Cell: Generate code for all collection view cells. Each cell generate a file.
- Collection Datasource: Generate code in a single file that hold data for collection view datasource.
- Custom View: Generate code for all custom views. Each custom view a generate a single file, which the filename is set by the user.
- UIView+Gradient: An fixed file, that improve gradient support for basic view (UIView) and custom view.