File tree 1 file changed +12
-1
lines changed
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,18 @@ class ViewController: UIViewController {
58
58
59
59
}
60
60
```
61
- For further customization of views and constraints, implement ` LayoutDelegate ` .
61
+ For further customization of views and constraints, implement some or all lambdas in ` configure ` clause as follows:
62
+ ``` swift
63
+ try ? Layout (name : " layout" ).configure {
64
+ // customize format options
65
+ $0 .formatOptions = { (id) -> NSLayoutConstraint.FormatOptions in [] }
66
+ // provide view yourself (if the class does not have default initializer) or fall back to the default implementation
67
+ $0 .viewOfType = { (type, id) -> UIView? in return Layout.view (of : type) }
68
+ // configure a newly created view
69
+ $0 .didCreate = { (view, id) -> Void in return }
70
+ }
71
+ .inflate (in : view)
72
+ ```
62
73
63
74
![ alt JSONLayout] ( https://github.com/maxvol/JSONLayout/blob/master/JSONLayout.jpg?raw=true )
64
75
You can’t perform that action at this time.
0 commit comments