We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 649c734 commit 4dd7004Copy full SHA for 4dd7004
Tests/FlexLayoutTests/FlexLayoutTests.swift
@@ -26,5 +26,18 @@ final class FlexLayoutTests: XCTestCase {
26
27
XCTAssertNil(weakView, "Creation of flex should not lead to retain cycle")
28
}
29
+
30
31
+ func testRemoveViewDynamically() {
32
+ let rootFlexContainer = UIView()
33
+ rootFlexContainer.flex.addItem(UIView())
34
+ rootFlexContainer.flex.define { _ in }
35
+ rootFlexContainer.flex.layout()
36
37
+ rootFlexContainer.subviews.forEach { $0.removeFromSuperview() }
38
+ rootFlexContainer.flex.markDirty()
39
40
41
+ XCTAssertTrue(rootFlexContainer.subviews.isEmpty)
42
+ }
43
0 commit comments