public async Task WhenShownAsync() { ModalPresentationStyle = UIModalPresentationStyle.FullScreen; ModalTransitionStyle = UIModalTransitionStyle.CoverVertical; TaskCompletionSource <object> presentedTaskCompletionSource = new TaskCompletionSource <object>(); PlatformFunctions.GetTopViewController().PresentViewController(this, true, () => { presentedTaskCompletionSource.TrySetResult(null); }); await presentedTaskCompletionSource.Task; }
public virtual void Dismiss() { if (PlatformFunctions.GetTopViewController() == this) { NavigationController?.PopViewController(true); } else { this.View?.RemoveFromSuperview(); this.RemoveFromParentViewController(); } this.DismissViewController(true, null); }
public void ShowOver(bool animated = true) { ShowOver(PlatformFunctions.GetTopViewController(), animated); }
public async Task ShowOverAsync(bool animated = true) { await ShowOverAsync(PlatformFunctions.GetTopViewController(), animated); }