Skip to content

Commit d7e8079

Browse files
committed
additional signature for UIView.attach(); UIView.fill was removed
1 parent 2d9d1ef commit d7e8079

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Sources/CoreUI/UIViewController+child.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ public extension UIViewController {
3030
.leading(padding), .top(padding), .trailing(-padding), .bottom(-padding))
3131
}
3232

33-
func fill(with child: UIViewController, in v: UIView? = nil) {
34-
add(child, into: v, padding: 0)
35-
}
36-
3733
func remove() {
3834
guard parent != nil else { return }
3935

@@ -44,14 +40,18 @@ public extension UIViewController {
4440

4541
@discardableResult
4642
func attach(to parent: UIViewController?, into v: UIView? = nil, _ anchors: LayoutAnchor...) -> Self {
43+
return attach(to: parent, into: v, anchors)
44+
}
45+
46+
@discardableResult
47+
func attach(to parent: UIViewController?, into v: UIView? = nil, _ anchors: [LayoutAnchor]) -> Self {
4748
parent?.add(self, into: v, anchors)
4849
return self
4950
}
5051

5152
@discardableResult
5253
func attach(to parent: UIViewController?, into v: UIView? = nil, padding: CGFloat) -> Self {
53-
parent?.add(self, into: v, .leading(padding), .top(padding), .trailing(-padding), .bottom(-padding))
54-
return self
54+
return attach(to: parent, into: v, .leading(padding), .top(padding), .trailing(-padding), .bottom(-padding))
5555
}
5656

5757
func detach() {

0 commit comments

Comments
 (0)