summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core
diff options
context:
space:
mode:
authoradrianknight89 <adrianknight89@outlook.com>2016-12-06 12:09:05 (GMT)
committerRui Marinho <me@ruimarinho.net>2016-12-06 12:09:05 (GMT)
commit5a2cb89775e4de1fe8b8e1d4b673612e5f41f94a (patch)
tree8c2cc85ae3048f229a478a8f22a1853df1058131 /Xamarin.Forms.Core
parent9dff4c16508452512c5faa36788f65ba6419170e (diff)
downloadxamarin-forms-5a2cb89775e4de1fe8b8e1d4b673612e5f41f94a.zip
xamarin-forms-5a2cb89775e4de1fe8b8e1d4b673612e5f41f94a.tar.gz
xamarin-forms-5a2cb89775e4de1fe8b8e1d4b673612e5f41f94a.tar.bz2
[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.cs7
1 files changed, 2 insertions, 5 deletions
diff --git a/Xamarin.Forms.Core/Page.cs b/Xamarin.Forms.Core/Page.cs
index 87b54bd..01dc600 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);
- }
}
}