Skip to content

Commit 118a3d1

Browse files
committed
FlexLayout - revert YGRemoveChild call and associated method body description
1 parent 5839d6a commit 118a3d1

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

Sources/Swift/FlexLayout.swift

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,19 +76,12 @@ public final class Flex {
7676

7777
This method enables flexbox for `view` and adds it as a subview of the receiver's associated host view.
7878

79-
Just as views can only have one superview, Yoga nodes should only have one parent node. If `view`
80-
already has a superview, this method removes `view`'s associated yoga node as a child from the superview's
81-
associated yoga node.
82-
8379
- Parameter view: The view to be added.
8480
- Returns: The flex interface corresponding to the added view.
8581
*/
8682
@discardableResult
8783
public func addItem(_ view: UIView) -> Flex {
8884
if let host = self.view {
89-
if let superview = view.superview, superview != host && superview.isYogaEnabled {
90-
YGNodeRemoveChild(superview.yoga.node, view.yoga.node)
91-
}
9285
host.addSubview(view)
9386
return view.flex
9487
} else {

0 commit comments

Comments
 (0)