lukesutton / olpej

An experiment with building declarative views in UIKit ala Elm, React etc.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Olpej

An experiment with building declarative views in UIKit ala Elm, React etc. Absolutely nowhere near ready for serious use, mainly for exploration at this point.

A small example:

import Olpej

let helloButton = button(
    .identifier("button"),
    .title("Hello", forState: .Normal),
    .backgroundColor(.blueColor()),
    .frame(x: 0, y: 0, width: 100, height: 50)
)

let layout = view(
    .identifier("view"),
    .backgroundColor(.whiteColor()),
    .frame(x: 0, y: 0, width: 400, height: 400)
).append([helloButton])


let output = layout.render()

About

An experiment with building declarative views in UIKit ala Elm, React etc.

License:MIT License


Languages

Language:Swift 97.8%Language:Objective-C 2.2%