summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.iOS
diff options
context:
space:
mode:
authorE.Z. Hart <hartez@users.noreply.github.com>2017-01-23 19:42:38 (GMT)
committerGitHub <noreply@github.com>2017-01-23 19:42:38 (GMT)
commit2c56d6211db41a1b105ac466630dca783d5bd1ec (patch)
tree4e476c7c527198e2a5c0048bf8f44e48bb6658da /Xamarin.Forms.Platform.iOS
parentc468302e9da38354d0b8d3004ac44f39b65f5fbf (diff)
downloadxamarin-forms-2c56d6211db41a1b105ac466630dca783d5bd1ec.zip
xamarin-forms-2c56d6211db41a1b105ac466630dca783d5bd1ec.tar.gz
xamarin-forms-2c56d6211db41a1b105ac466630dca783d5bd1ec.tar.bz2
Reduce overhead of pushing existing navigation stack (#672)
* Make StackCopy less awkward * Clean up comment * Update docs * Update docs * Replace SecondToLast with an arbitrarily deep Peek method * Update docs * Handle negative depths in Peek()
Diffstat (limited to 'Xamarin.Forms.Platform.iOS')
-rw-r--r--Xamarin.Forms.Platform.iOS/Renderers/NavigationRenderer.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Xamarin.Forms.Platform.iOS/Renderers/NavigationRenderer.cs b/Xamarin.Forms.Platform.iOS/Renderers/NavigationRenderer.cs
index 6b698f2..1465b8d 100644
--- a/Xamarin.Forms.Platform.iOS/Renderers/NavigationRenderer.cs
+++ b/Xamarin.Forms.Platform.iOS/Renderers/NavigationRenderer.cs
@@ -211,7 +211,7 @@ namespace Xamarin.Forms.Platform.iOS
UpdateBarTextColor();
// If there is already stuff on the stack we need to push it
- ((INavigationPageController)navPage).StackCopy.Reverse().ForEach(async p => await PushPageAsync(p, false));
+ ((INavigationPageController)navPage).Pages.ForEach(async p => await PushPageAsync(p, false));
_tracker = new VisualElementTracker(this);
@@ -617,7 +617,7 @@ namespace Xamarin.Forms.Platform.iOS
if (containerController == null)
return;
var currentChild = containerController.Child;
- var firstPage = ((INavigationPageController)Element).StackCopy.LastOrDefault();
+ var firstPage = ((INavigationPageController)Element).Pages.FirstOrDefault();
if ((firstPage != pageBeingRemoved && currentChild != firstPage && NavigationPage.GetHasBackButton(currentChild)) || _parentMasterDetailPage == null)
return;