Skip to content

Commit a9c4ae8

Browse files
committed
Put setRect in a else condition
1 parent 457b17b commit a9c4ae8

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

Sources/Impl/PinLayout+Layouting.swift

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -137,15 +137,9 @@ extension PinLayout {
137137
if Pin.autoSizingInProgress, let autoSizeCalculable = view as? AutoSizeCalculable {
138138
let marginInsets = PEdgeInsets(top: -_marginTop, left: -_marginLeft, bottom: -_marginBottom, right: -_marginRight)
139139
autoSizeCalculable.setAutoSizingRect(newRect, margins: marginInsets)
140+
} else {
141+
view.setRect(newRect, keepTransform: keepTransform)
140142
}
141-
142-
/*
143-
To adjust the view's position and size, we don't set the UIView's frame directly, because we want to keep the
144-
view's transform (UIView.transform).
145-
By setting the view's center and bounds we really set the frame of the non-transformed view, and this keep
146-
the view's transform. So view's transforms won't be affected/altered by PinLayout.
147-
*/
148-
view.setRect(newRect, keepTransform: keepTransform)
149143
}
150144

151145
private func handlePinEdges() {

0 commit comments

Comments
 (0)