Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Map in TabbedPage and Screen Rotation in iOS

$
0
0

Hi,

I ran into a problem using the Xamarin.Forms.Maps.Map control in a TabbedPage on iOS. When the map is set to fill vertical and horizontal on a child tab page, if any of the annotations have their call-out visible and the screen gets rotated, the map does not change size to fit the new dimensions. For example, if the map is 200x600 portrait, and it rotates, it will still be 200x600, even though it should now be 600x200. This ONLY happens if any of the call-outs are visible, and ONLY if it is in a TabbedPage. If none are visible, or is in a regular ContentPage, it rotates and resizes normally.

An example of this can be seen with the Working With Maps sample at:

https://github.com/xamarin/xamarin-forms-samples/tree/master/WorkingWithMaps

The screenshots there are outdated, because the sample is now using a TabbedPage. No changes are necessary to the sample to see this behavior on iOS. Simply run the sample, select the Pins tab, tap the pin, and when the "Santa Cruz" detail pops up above the pin, rotate the device. There will now be a large empty area.

I have attached a screenshot from the simulator from the sample application to show this behavior.

Anyone have any suggestions for a fix or a work-around short of not using a tabbed page?


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>