Skip to content

Commit 5a70ee0

Browse files
committed
renamed lambda
1 parent 6647e0c commit 5a70ee0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Layout.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public class Layout {
4040
private func add(views: [String: MarkupElement], to root: UIView) {
4141
for (id, view) in views {
4242
guard let v = self.viewOfType(view.type, id) else { continue }
43-
self.didCreate(v, id)
43+
self.didCreateView(v, id)
4444
v.translatesAutoresizingMaskIntoConstraints = false
4545
v.tag = id.hash
4646
self.views[id] = v
@@ -75,7 +75,7 @@ public class Layout {
7575

7676
public var formatOptions: FormatOptionsForConstraintID = { (id) -> NSLayoutConstraint.FormatOptions in [] }
7777
public var viewOfType: ViewOfTypeForID = { (type, id) -> UIView? in return Layout.view(of: type) }
78-
public var didCreate: DidCreateViewForID = { (view, id) -> Void in return }
78+
public var didCreateView: DidCreateViewForID = { (view, id) -> Void in return }
7979

8080
}
8181

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ try? Layout(name: "layout").configure {
6666
// provide view yourself (if the class does not have default initializer) or fall back to the default implementation
6767
$0.viewOfType = { (type, id) -> UIView? in return Layout.view(of: type) }
6868
// configure a newly created view
69-
$0.didCreate = { (view, id) -> Void in return }
69+
$0.didCreateView = { (view, id) -> Void in return }
7070
}
7171
.inflate(in: view)
7272
```

0 commit comments

Comments
 (0)