Skip to content

Commit 152b8b6

Browse files
committed
Don’t layout if isIncludedInPinLayout is false
1 parent 5baaa20 commit 152b8b6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Sources/Impl/PinLayout+Layouting.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ extension PinLayout {
4040
}
4141

4242
func apply() {
43-
guard !isLayouted else { return }
43+
guard !isLayouted && view.isIncludedInPinLayout else { return }
4444
apply(onView: view)
4545
isLayouted = true
4646
}

Sources/PinLayout.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public class PinLayout<PinView: Layoutable> {
7878
}
7979

8080
deinit {
81-
if !isLayouted && Pin.logMissingLayoutCalls {
81+
if !isLayouted && !view.isIncludedInPinLayout && Pin.logMissingLayoutCalls {
8282
warn("PinLayout commands have been issued without calling the 'layout()' method to complete the layout. (These warnings can be disabled by setting Pin.logMissingLayoutCalls to false)")
8383
}
8484
apply()

0 commit comments

Comments
 (0)