EverLayout 0.2.0

EverLayout 0.2.0

DocsDocumented
TestsTested
LangLanguage SwiftSwift
License Custom
ReleasedLast Release Feb 2017
SwiftSwift Version 3.0
SPMSupports SPM

Maintained by Dale Webster.


Downloads

Total16
Week13
Month16

Installs

Apps5
Apps WeekApps This Week 3
powered by Segment

GitHub

Stars25
Watchers2
Forks0
Issues0
Contributors1
Pull Requests0

Code

Files34
SizeIntegration Size 180 kb
LOCLines of Code 1,426


  • By
  • Dale Webster

Overview

EverLayout is an iOS layout building tool. By default, EverLayout can read layout data in JSON and interpret and build these layouts entirely at runtime.

This means:

  • Create comprehensive layouts without the clumsiness of Interface Builder or view controllers bloated with layout code.
  • Downloadable layouts - Layouts written in JSON can be downloaded from a web server, meaning an App UI can be updated without having to submit for App Review.
  • Build layouts with real-time update using a simple HTTP server (or EverLayout Bridge).
  • A/B Testing - Testing multiple UIs with your users is easy when building a layout is just loading a file.

Docs

More detailed documentation here.

Installation

EverLayout can be installed with CocoaPods.

pod 'EverLayout'

More information on EverLayout Bridge can be found here

Simple Example

Basic example

{
    "name":"ViewController",
    "root":{
        "views":{
            "!redSquare":{
                "constraints": {
                    "width height":"+180",
                    "center":"@super <24"
                },
                "properties":{
                    "backgroundColor":"red"
                }
            }
        }
    }
}

Here I am running a blank application in the simulator side-by-side with a ViewController layout described in JSON, which is loaded by the default View Controller. The app has connected to EverLayout Bridge which is serving it layout updates ever time I save the layout file.

In the example I am just changing the properties of a UIView to show how layouts can be designed/built without having to re-compile the app.

Discussion

At the moment EverLayout is more of an experiment than a solution. The idea was born through frustration of Interface Builder and the existing alternative of clunky layout code.

The goal of this project is to find a middle ground which can offer the real-time ‘visual’ approach of IB, and the flexibility and re-usability of layouts described with code.

Dependencies

At the moment EverLayout uses SwiftyJSON to parse JSON files, and Socket.IO for communication with EverLayout Bridge.