Skip to content

Commit 9666aed

Browse files
committed
Fixed layout.
1 parent 9f52059 commit 9666aed

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

Sources/NativeUIKit/Views/NativePlaceholderView.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,8 @@ open class PlaceholderView: SPButton {
122122
*/
123123
open func layoutCenter() {
124124
guard let superview = self.superview else { return }
125-
sizeToFit()
126125
let width = min(superview.readableWidth, NativeLayout.Sizes.actionable_area_maximum_width)
127-
frame.setWidth(width)
126+
frame.setWidthAndFit(width: width)
128127
superview.setXCenter()
129128
center.y = (superview.frame.height / 2) * 0.94
130129
}

Sources/NativeUIKit/Views/NativePromoView.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,8 @@ open class NativePromoView: SPView {
8484

8585
open func layout(y: CGFloat) {
8686
guard let superview = self.superview else { return }
87-
sizeToFit()
8887
let width = min(superview.readableWidth, NativeLayout.Sizes.actionable_area_maximum_width)
89-
frame.setWidth(width)
88+
setWidthAndFit(width: width)
9089
setXCenter()
9190
frame.origin.y = y
9291
}

0 commit comments

Comments
 (0)