Skip to content
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
8 changes: 7 additions & 1 deletion src/Controls/src/Core/Platform/iOS/ControlsModalWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,13 @@ public override bool ShouldAutorotateToInterfaceOrientation(UIInterfaceOrientati
public override void ViewDidLayoutSubviews()
{
base.ViewDidLayoutSubviews();
_modal?.PlatformArrange(new Rect(0, 0, View!.Bounds.Width, View.Bounds.Height));

// Defensive check to prevent crashes during iOS snapshot creation
// when VirtualView may be disposed during app state transitions
if (_modal?.VirtualView is Page)
{
_modal?.PlatformArrange(new Rect(0, 0, View!.Bounds.Width, View.Bounds.Height));
}
}

public override void ViewWillAppear(bool animated)
Expand Down