Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix popup margin on iOS #1329

Merged
merged 4 commits into from
Aug 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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