Skip to content
App and builder classes to help you build iOS layouts
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


With this app you can code and quickly debug your layouts before adding them to your app.

The app is meant to be run on an iPad so you can preview the layout in different sizes with the resizable container view.

Edit PreviewController.swift and configure your layout there.

You may use util classes like LayoutBuilder and LinearBuilder.

Those classes let you build layouts using the Visual Format Language with extra features to make it much easier. Example:

        let row = LinearBuilder(axis: .horizontal) // similar to Android's LinearLayout
            .margin(between: 5)
            .addViews([subtitle, icon])
            .wrapContent(view: icon) // similar to Android's wrap_content

        let view = LayoutBuilder()
            .addViews(["title":title, "row":row])
                "X:title.centerX == parent.centerX"  // extra constraint format, supported by LayoutBuilder

You can see the complete code in PreviewController.swift.

If run the app you will see something like this:

You can’t perform that action at this time.