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; } }); } }
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: () => { }); } }
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; } }); } }
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: () => { }); } }