예제 #1
0
        public void HideBackgroundAnimated(bool animated)
        {
            if (_BackgroundWindow != null)
            {
                if (!animated)
                {
                    _BackgroundWindow.RemoveFromSuperview();
                    _BackgroundWindow = null;
                    return;
                }

                UIView.Animate(
                    duration: 0.3f,
                    delay: 0f,
                    options: UIViewAnimationOptions.CurveEaseInOut,
                    animation: () => { _BackgroundWindow.Alpha = 0; },
                    completion: () => {
                    if (_BackgroundWindow != null)
                    {
                        _BackgroundWindow.RemoveFromSuperview();
                        _BackgroundWindow = null;
                    }
                });
            }
        }
예제 #2
0
 public void ShowBackground()
 {
     if (_BackgroundWindow == null)
     {
         _BackgroundWindow = new SIAlertBackgroundWindow(CurrentAlertView.BackgroundStyle, UIScreen.MainScreen.Bounds);
         _BackgroundWindow.MakeKeyAndVisible();
         _BackgroundWindow.Alpha = 0f;
         UIView.Animate(
             duration: 0.3f,
             delay: 0f, options: UIViewAnimationOptions.CurveEaseInOut,
             animation: () => { _BackgroundWindow.Alpha = 1; },
             completion: () => { });
     }
 }
예제 #3
0
        public void HideBackgroundAnimated(bool animated)
        {
            if (_BackgroundWindow != null)
            {
                if (!animated)
                {
                    _BackgroundWindow.RemoveFromSuperview();
                    _BackgroundWindow = null;
                    return;
                }

                UIView.Animate(
                    duration: 0.3f,
                    delay: 0f,
                    options: UIViewAnimationOptions.CurveEaseInOut,
                    animation: () => { _BackgroundWindow.Alpha = 0; },
                    completion: () => {
                        if (_BackgroundWindow != null)
                        {
                            _BackgroundWindow.RemoveFromSuperview();
                            _BackgroundWindow = null;
                        }
                    });
            }
        }
예제 #4
0
 public void ShowBackground()
 {
     if (_BackgroundWindow == null)
     {
         _BackgroundWindow = new SIAlertBackgroundWindow(CurrentAlertView.BackgroundStyle, UIScreen.MainScreen.Bounds);
         _BackgroundWindow.MakeKeyAndVisible();
         _BackgroundWindow.Alpha = 0f;
         UIView.Animate(
             duration: 0.3f,
             delay: 0f, options: UIViewAnimationOptions.CurveEaseInOut,
             animation: () => { _BackgroundWindow.Alpha = 1; },
             completion: () => { });
     }
 }