Skip to content

Commit d7ea57d

Browse files
author
Alexander Mai
committed
fix (bottomsheet ios) corrected width on safe areas
* the right and bottom values erroneously subtract the left and top distances, respectively * the error only appears when there are safe areas on the sides, for example on an iPhone X * removing the subtraction is correcting this issue
1 parent 8e86c3a commit d7ea57d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bottomsheet/bottomsheet.ios.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,8 @@ function layoutView(controller: IUILayoutViewController, owner: View): void {
189189
owner.nativeViewProtected.frame = CGRectMake(
190190
Utils.layout.toDeviceIndependentPixels(adjustedPosition.left),
191191
Utils.layout.toDeviceIndependentPixels(adjustedPosition.top),
192-
Utils.layout.toDeviceIndependentPixels(adjustedPosition.right - adjustedPosition.left),
193-
Utils.layout.toDeviceIndependentPixels(adjustedPosition.bottom - adjustedPosition.top)
192+
Utils.layout.toDeviceIndependentPixels(adjustedPosition.right),
193+
Utils.layout.toDeviceIndependentPixels(adjustedPosition.bottom)
194194
);
195195
}
196196
controller.preferredContentSize = CGSizeMake(Utils.layout.toDeviceIndependentPixels(effectiveWidth), Utils.layout.toDeviceIndependentPixels(effectiveHeight));

0 commit comments

Comments
 (0)