コード例 #1
0
 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
         );
 };
コード例 #2
0
        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);
            }
                );
        };