public static Action <bool> BindIsVisibleWithFade(this UIView view) => isVisible => { var alpha = isVisible ? 1 : 0; AnimationExtensions.Animate( Animation.Timings.EnterTiming, Animation.Curves.EaseIn, () => view.Alpha = alpha ); };
public static Action <bool> BindAnimatedIsVisible(this UIView view) => isVisible => { view.Transform = CGAffineTransform.MakeTranslation(0, 20); AnimationExtensions.Animate( Animation.Timings.EnterTiming, Animation.Curves.SharpCurve, () => { view.Hidden = !isVisible; view.Transform = CGAffineTransform.MakeTranslation(0, 0); } ); };