Skip to content

Commit 4049b3e

Browse files
authored
Merge pull request #2181 from PrismLibrary/transparent-modal
Fix iOS modal transparency
2 parents 6daceb0 + 3edc501 commit 4049b3e

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/Forms/Prism.Forms/Services/Dialogs/DialogPage.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
using Xamarin.Forms;
2+
using Xamarin.Forms.PlatformConfiguration;
3+
using Xamarin.Forms.PlatformConfiguration.iOSSpecific;
24

35
namespace Prism.Services.Dialogs
46
{
@@ -8,6 +10,7 @@ public DialogPage()
810
{
911
AutomationId = "PrismDialogModal";
1012
BackgroundColor = Color.Transparent;
13+
On<iOS>().SetModalPresentationStyle(UIModalPresentationStyle.OverFullScreen);
1114
}
1215

1316
public View DialogView { get; set; }

src/Forms/Prism.Forms/Services/Dialogs/DialogService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ private void InsertPopupViewInCurrentPage(ContentPage currentPage, DialogPage mo
299299

300300
modalPage.Content = overlay;
301301
modalPage.DialogView = popupView;
302-
currentPage.Navigation.PushModalAsync(modalPage, false);
302+
currentPage.Navigation.PushModalAsync(modalPage, true);
303303
}
304304

305305
private static Style GetOverlayStyle(View popupView)

0 commit comments

Comments
 (0)