xamarin/Xamarin.Forms

Alerts/Action sheets Break Orientation Changes

開放

#3,376 建立於 2018年7月23日

 (3 則留言) (1 個反應) (0 位負責人)C# (1,926 個分叉)batch import
e/5 :clock5:help wantedp/iOS 🍎t/bug :bug:up-for-grabs

倉庫指標

星標
 (5,644 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

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:

good

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):

bad

The UI is completely missing (black) and therefore unusable.

Steps to Reproduce

  1. Download the repro project
  2. Run it up on iOS
  3. Select Take Photo
  4. Rotate the device any number of times in any orientation and observe that it all works as expected
  5. Cancel the photo
  6. Select Show an Alert
  7. Dismiss the alert
  8. Select Take Photo
  9. 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
  • Nuget Packages: Xam.Plugin.Media 4.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.

Reproduction Link

Repro solution

貢獻者指南