Пример #1
0
        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;
        }
Пример #2
0
 public virtual void Dismiss()
 {
     if (PlatformFunctions.GetTopViewController() == this)
     {
         NavigationController?.PopViewController(true);
     }
     else
     {
         this.View?.RemoveFromSuperview();
         this.RemoveFromParentViewController();
     }
     this.DismissViewController(true, null);
 }
Пример #3
0
 public void ShowOver(bool animated = true)
 {
     ShowOver(PlatformFunctions.GetTopViewController(), animated);
 }
Пример #4
0
 public async Task ShowOverAsync(bool animated = true)
 {
     await ShowOverAsync(PlatformFunctions.GetTopViewController(), animated);
 }