Skip to content

Commit

Permalink
Fix popup margin on iOS (#1329)
Browse files Browse the repository at this point in the history
  • Loading branch information
cat0363 authored Aug 10, 2023
1 parent e4d7bee commit 57f2547
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ public static void SetLayout(this MauiPopup mauiPopup, in IPopup popup)

mauiPopup.PopoverPresentationController.SourceRect = new CGRect(originX, originY, 0, 0);
mauiPopup.PopoverPresentationController.PermittedArrowDirections = 0;
// From the point of view of usability, the top, bottom, left, and right values of UIEdgeInsets cannot all be 0.
// If you specify 0 for the top, bottom, left, and right of UIEdgeInsets, the default margins will be added, so
// specify a value as close to 0 here as possible.
mauiPopup.PopoverPresentationController.PopoverLayoutMargins = new UIEdgeInsets(0.0001f, 0.0001f, 0.0001f, 0.0001f);
}
else
{
Expand Down

0 comments on commit 57f2547

Please sign in to comment.