Skip to content

Commit 790b738

Browse files
committed
fix: ios bottomsheet to correctly handle margin
1 parent 1c99aa8 commit 790b738

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/bottomsheet/bottomsheet.ios.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,17 +94,16 @@ function layoutView(controller: IUILayoutViewController, owner: View): void {
9494
const top = marginTop + position.top;
9595
const width = owner.getMeasuredWidth();
9696
const height = owner.getMeasuredHeight();
97-
98-
View.layoutChild(null, owner, position.left, position.top, position.left + width, position.top + height);
97+
View.layoutChild(null, owner, position.left, top, position.left + width + marginLeft+ marginRight, position.top + height+ marginBottom);
9998

10099
const effectiveWidth = width + marginLeft + marginRight;
101100
let effectiveHeight = height + top + marginBottom;
102101
if (controller.ignoreTopSafeArea || controller.ignoreBottomSafeArea) {
103102
const frame = CGRectMake(
104103
Utils.layout.toDeviceIndependentPixels(marginLeft),
105104
Utils.layout.toDeviceIndependentPixels(top),
106-
Utils.layout.toDeviceIndependentPixels(effectiveWidth),
107-
Utils.layout.toDeviceIndependentPixels(effectiveHeight)
105+
Utils.layout.toDeviceIndependentPixels(width),
106+
Utils.layout.toDeviceIndependentPixels(height)
108107
);
109108
const availableSpace = getAvailableSpaceFromParent(owner, frame);
110109

0 commit comments

Comments
 (0)