예제 #1
0
 private Action CreateChainedAnimationAction(Animation animation, UIViewAnimationOptions options, Action nextAction)
 {
     if (animation.IsActionOnly)
     {
         return(() =>
         {
             animation.Action();
             if (nextAction != null)
             {
                 nextAction();
             }
             else
             {
                 if (_whenCompleteAction != null)
                 {
                     _whenCompleteAction();
                 }
                 if (_repeaterAction != null)
                 {
                     _repeaterAction();
                 }
             }
         });
     }
     return(() =>
            UIView.Animate(animation.Duration, animation.Delay, options,
                           () => animation.Action(),
                           () =>
     {
         if (nextAction != null)
         {
             nextAction();
         }
         else
         {
             if (_whenCompleteAction != null)
             {
                 _whenCompleteAction();
             }
             if (_repeaterAction != null)
             {
                 _repeaterAction();
             }
         }
     }));
 }
예제 #2
0
 private Action CreateChainedAnimationAction(Animation animation, UIViewAnimationOptions options, Action nextAction)
 {
     if (animation.IsActionOnly)
     {
         return () =>
         {
             animation.Action();
             if (nextAction != null) nextAction();
             else
             {
                 if (_whenCompleteAction != null) _whenCompleteAction();
                 if (_repeaterAction != null) _repeaterAction();
             }
         };
     }
     return () =>
             UIView.Animate(animation.Duration, animation.Delay, options,
                            () => animation.Action(),
                            () =>
                            {
                                if (nextAction != null) nextAction();
                                else
                                {
                                    if (_whenCompleteAction != null) _whenCompleteAction();
                                    if (_repeaterAction != null) _repeaterAction();
                                }
                            });
 }