locked
ActionSheet not staying in the middle of the screen on iPads after rotation? RRS feed

  • Question

  • User244580 posted

    I recently started using ActionSheets in my application but noticed that when I rotate my iPad, the ActionSheet does not stay in the center of the screen. Has anyone else seen this? See screenshots below. I'm just simply using the Page.DisplayActionSheet() method to do this. Android seems to work just fine.

    I think it may have to do with the UIDevice.OrientationDidChangeNotification. I tried to create a custom ActionSheet and based it on the Xamarin.Forms code found here.

    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.

    This is happening as far back as Xamarin.Forms 2.3.2.127 (maybe further) and also in 2.3.4.224.

    Starting position (landscape):

    Rotate right (portrait):

    Rotate back to starting position (landscape):

    Tuesday, April 11, 2017 3:00 PM

All replies

  • User89714 posted

    @jfritsch - I can confirm that this happens. It looks like a bug in XF. If nobody else has done so, raise a bug at https://bugzilla.xamarin.com/ for this

    Tuesday, April 11, 2017 3:14 PM
  • User244580 posted

    Thanks, @JohnHardman.

    Bug report 55035 has been created.

    Tuesday, April 11, 2017 7:50 PM