diff options
author | adrianknight89 <adrianknight89@outlook.com> | 2016-12-06 06:09:05 -0600 |
---|---|---|
committer | Rui Marinho <me@ruimarinho.net> | 2016-12-06 12:09:05 +0000 |
commit | 5a2cb89775e4de1fe8b8e1d4b673612e5f41f94a (patch) | |
tree | 8c2cc85ae3048f229a478a8f22a1853df1058131 /Xamarin.Forms.Core | |
parent | 9dff4c16508452512c5faa36788f65ba6419170e (diff) | |
download | xamarin-forms-5a2cb89775e4de1fe8b8e1d4b673612e5f41f94a.tar.gz xamarin-forms-5a2cb89775e4de1fe8b8e1d4b673612e5f41f94a.tar.bz2 xamarin-forms-5a2cb89775e4de1fe8b8e1d4b673612e5f41f94a.zip |
[iOS] Fix crash when pushing page on stack on orientation change (#607)
* Fix orientation crash
* remove braces
Diffstat (limited to 'Xamarin.Forms.Core')
-rw-r--r-- | Xamarin.Forms.Core/Page.cs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Xamarin.Forms.Core/Page.cs b/Xamarin.Forms.Core/Page.cs index 87b54bd3..01dc600a 100644 --- a/Xamarin.Forms.Core/Page.cs +++ b/Xamarin.Forms.Core/Page.cs @@ -167,20 +167,17 @@ namespace Xamarin.Forms area.Height = Math.Max(0, area.Height); } - foreach (Element element in ElementController.LogicalChildren) + List<Element> elements = ElementController.LogicalChildren.ToList(); + foreach (Element element in elements) { var child = element as VisualElement; if (child == null) continue; var page = child as Page; if (page != null && ((IPageController)page).IgnoresContainerArea) - { Forms.Layout.LayoutChildIntoBoundingRegion(child, originalArea); - } else - { Forms.Layout.LayoutChildIntoBoundingRegion(child, area); - } } } |