Gracias por el puesto de código iPhone.
La segunda respuesta es el uso de una variable global y omite los parámetros para la devolución de llamada. Esto es lo que descubrí hoy basado en la primera respuesta.
private void BeginPulse (Button button)
{
UIView.BeginAnimations (button+"fadeIn", button.Handle);
UIView.SetAnimationDelegate (this);
UIView.SetAnimationDidStopSelector (new MonoTouch.ObjCRuntime.Selector ("makeVisibleAgain:finished:context:"));
UIView.SetAnimationCurve(UIViewAnimationCurve.EaseOut);
UIView.SetAnimationDuration (0.5);
button.Alpha = 0.25f;
UIView.CommitAnimations();
}
[Export ("makeVisibleAgain:finished:context:")]
private void EndPulse (NSString animationId, NSNumber finished, UIButton button)
{
UIView.BeginAnimations (null, System.IntPtr.Zero);
UIView.SetAnimationDelegate (this);
UIView.SetAnimationCurve (UIViewAnimationCurve.EaseIn);
UIView.SetAnimationDuration (0.5);
button.Alpha = 1;
UIView.CommitAnimations();
}
Gran respuesta; muy fácil de portar a mono – rpetrich