File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -12,10 +12,10 @@ public enum LayoutError: Error {
12
12
case fileNotFound( String )
13
13
}
14
14
15
- @ objc public protocol LayoutDelegate {
16
- @ objc optional func view( of type: String , for id: String ) -> UIView ?
17
- @ objc optional func didCreate( _ view: UIView , for id: String )
18
- @ objc optional func formatOptions( for constraint: String ) -> NSLayoutConstraint . FormatOptions
15
+ public protocol LayoutDelegate {
16
+ func view( of type: String , for id: String ) -> UIView ?
17
+ func didCreate( _ view: UIView , for id: String )
18
+ func formatOptions( for constraint: String ) -> NSLayoutConstraint . FormatOptions
19
19
}
20
20
21
21
extension LayoutDelegate {
@@ -59,7 +59,7 @@ public class Layout {
59
59
private func add( views: [ String : MarkupElement ] , to root: UIView ) {
60
60
for (id, view) in views {
61
61
guard let v = self . delegate? . view ( of: view. type, for: id) ?? Layout . view ( of: view. type) else { continue }
62
- self . delegate? . didCreate ? ( v, for: id)
62
+ self . delegate? . didCreate ( v, for: id)
63
63
v. translatesAutoresizingMaskIntoConstraints = false
64
64
v. tag = id. hash
65
65
self . views [ id] = v
You can’t perform that action at this time.
0 commit comments