Skip to content

Releases: maxvol/JSONLayout

SPM support

01 Jul 18:46
05d7c0e
Compare
Choose a tag to compare
0.1.3

Update Package.swift

0.1.1

13 Feb 07:15
Compare
Choose a tag to compare
Merge remote-tracking branch 'refs/remotes/origin/master'

better lambda name(s)

12 Feb 17:14
Compare
Choose a tag to compare
try? Layout(name: "layout").configure {
    // customize format options
    $0.formatOptions = { (id) -> NSLayoutConstraint.FormatOptions in [] }
    // provide view yourself (if the class does not have default initializer) or fall back to the default implementation
    $0.viewOfType = { (type, id) -> UIView? in return Layout.view(of: type) }
    // configure a newly created view
    $0.didCreateView = { (view, id) -> Void in return }
}
.inflate(in: view)

replaced delegate with lambdas

12 Feb 16:49
Compare
Choose a tag to compare
try? Layout(name: "layout").configure {
    // customize format options
    $0.formatOptions = { (id) -> NSLayoutConstraint.FormatOptions in [] }
    // provide view yourself (if the class does not have default initializer) or fall back to the default implementation
    $0.viewOfType = { (type, id) -> UIView? in return Layout.view(of: type) }
    // configure a newly created view
    $0.didCreate = { (view, id) -> Void in return }
}
.inflate(in: view)

more delegate

12 Feb 04:43
Compare
Choose a tag to compare
public protocol LayoutDelegate {
    func view(of type: String, for id: String) -> UIView?
    func didCreate(_ view: UIView, for id: String)
    func formatOptions(for constraint: String) -> NSLayoutConstraint.FormatOptions
}

func didCreate(_ view: UIView, with id: String)

12 Feb 03:39
Compare
Choose a tag to compare
0.0.4

delegate: func didCreate(_ view: UIView, with id: String)

FormatOptions delegate

10 Feb 10:39
Compare
Choose a tag to compare
0.0.3

Merge remote-tracking branch 'refs/remotes/origin/master'

0.0.2

10 Feb 07:23
a3543d4
Compare
Choose a tag to compare
Update UIView+findViewByID.swift