Alerts/Action sheets Break Orientation Changes
#3,376 opened on Jul 23, 2018
Repository metrics
- Stars
- (5,644 stars)
- PR merge metrics
- (No merged PRs in 30d)
Description
NOTE: I am not certain that this is an XF issue, but it feels like it to me. It may also be a general iOS issue. I'd welcome any guidance from the Xamarin team either way.
Description
If a MediaPickerController is displayed after a call to DisplayAlert (or DisplayActionSheet) then orientation changes within the controller cause the UI to go wonky.
Here's an example of things working correctly:

Notice the UI for taking a photo/cancelling looks fine, even though I'd reoriented the camera several times before this shot.
Here's an example of it going awry (after DisplayAlert has been called):

The UI is completely missing (black) and therefore unusable.
Steps to Reproduce
- Download the repro project
- Run it up on iOS
- Select Take Photo
- Rotate the device any number of times in any orientation and observe that it all works as expected
- Cancel the photo
- Select Show an Alert
- Dismiss the alert
- Select Take Photo
- Rotate the device once or twice and observe the UI bug
Expected Behavior
The UI should behave correctly, without being cut off due to an orientation mismatch.
Actual Behavior
The UI does not always respond correctly to the orientation change.
Basic Information
- Version with issue:
3.1.0.637273 - Last known good version: -
- IDE: Visual Studio 2017
- Platform Target Frameworks:
- iOS:
11.4
- iOS:
- Nuget Packages:
Xam.Plugin.Media4.0.1.4-beta - Affected Devices: Only observed on iPhone X and iPhone 5s. Did not reproduce on an iPad mini.
Screenshots
Please see screenshots above.