Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 548 Bytes

File metadata and controls

26 lines (18 loc) · 548 Bytes

Hello, World

BlueprintView is a UIView subclass that can display an element hierarchy.

import UIKit
import BlueprintUI
import BlueprintUICommonControls

private func makeHelloWorldElement() -> Element {
    var label = Label(text: "Hello, world")
    label.font = .boldSystemFont(ofSize: 18.0)
    return Centered(label)
}

final class ViewController: UIViewController {

    private let blueprintView = BlueprintView(element: makeHelloWorldElement())

    override func loadView() {
        self.view = blueprintView
    }

}