Bug 55035 - ActionSheet not staying in the middle of the screen after rotation on iPads
Summary: ActionSheet not staying in the middle of the screen after rotation on iPads
Alias: None
Product: Forms
Classification: Xamarin
Component: iOS ()
Version: 2.3.4
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2017-04-11 18:10 UTC by jared.fritsch
Modified: 2017-07-12 22:50 UTC (History)
4 users (show)

Tags: ios, ipad, actionsheet, rotation ac
Is this bug a regression?: No
Last known good build:

Screenshots (1.42 MB, application/x-zip-compressed)
2017-04-11 18:10 UTC, jared.fritsch
repro project (142.04 KB, application/x-zip-compressed)
2017-04-12 16:04 UTC, Jimmy [MSFT]

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report for Bug 55035 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description jared.fritsch 2017-04-11 18:10:27 UTC
Created attachment 21438 [details]

When using Page.DisplayActionSheet() to display an action sheet on an iPad, rotating the iPad causes the action sheet to no longer be centered on the screen.

Steps to reproduce:

  1. Display an action sheet.
     DisplayActionSheet("Xamarin Action Sheet", "Cancel", "Destroy", "Button 1", "Button 2", "Button 3");

  2. Rotate the iPad.

Actual result:

  The action sheet moves to a location other than the center of the screen.

Expected result:

  The action sheet should stay centered.

Build date & hardware:

  April 11, 2017
  iPad Air 1 - iOS 10.2.1

Additional information:

  I think it may have to do with the UIDevice.OrientationDidChangeNotification. The notification name implies that the orientation change already did occur. However, the bounds of the view are still the same as the bounds before the rotation happens. Should the bounds be correct (the bounds it will be once the rotation completes), it works just fine. The notification seems to be more of an orientation will occur/is occuring type of thing.



Forum post: https://forums.xamarin.com/discussion/92907/actionsheet-not-staying-in-the-middle-of-the-screen-on-ipads-after-rotation
Comment 1 Jimmy [MSFT] 2017-04-12 16:04:39 UTC
Created attachment 21471 [details]
repro project

I can reproduce this issue with the project I am attaching. This is affecting ActionSheets but not Alerts. I am confirming this report so the team can investigate further.

### Steps to Reproduce
1. Run the attached iOS project on an iPad device/sim
2. Press "Display ActionSheet"
3. Rotate the screen

### Expected Results
The ActionSheet will remain centered on the screen after rotation.

### Actual Results
The ActionSheet is off center.

### Version tests    BAD   BAD   BAD