/// <summary> /// Remove top view on stack /// </summary> /// <param name="animated">Flags for animation</param> public async Task Pop(bool animated) { if (Top != null) { var tobeRemoved = Top; if (animated) { if (PopAnimation != null) { await RunCustomPopAnimation(tobeRemoved, PopAnimation); } else { await RunDefaultPopAnimation(tobeRemoved); } } InternalStack.Remove(tobeRemoved); _focusStack.Remove(tobeRemoved); Remove(tobeRemoved); UpdateTopView(); tobeRemoved.Dispose(); } }
public void Remove(EvasObject view) { InternalStack.Remove(view); UnPack(view); UpdateTopView(); Device.BeginInvokeOnMainThread(() => { view?.Unrealize(); }); }
public void Pop() { if (CurrentView != null) { var tobeRemoved = CurrentView; InternalStack.Remove(tobeRemoved); UnPack(tobeRemoved); UpdateTopView(); // if Pop was called by removed page, // Unrealize cause deletation of NativeCallback, it could be a cause of crash Device.BeginInvokeOnMainThread(() => { tobeRemoved.Unrealize(); }); } }
/// <summary> /// Removes a view in the navigation stack /// </summary> /// <param name="view">The view to remove</param> public void Pop(View view) { InternalStack.Remove(view); _focusStack.Remove(view); Remove(view); }