Estoy tratando de animar la etiqueta de texto en una celda UItableview cuando presiono el botón editar. Estoy tratando de hacer que se desvanezca y se desvanezcan. desapareciendo en las obras, pero cuando presiono 'editar' la etiqueta de texto desaparece y cuando presiono 'listo' me desvanece perfectamente.texto animado en uitableviewcell usando willTransitionToState
¿Alguien me puede decir por qué no funciona?
gracias de antemano
- (void)willTransitionToState:(UITableViewCellStateMask)state {
[super willTransitionToState:state];
if ((state & UITableViewCellStateEditingMask) || (state & UITableViewCellStateShowingDeleteConfirmationMask)) {
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.3];
label.alpha = 0.0;
[UIView commitAnimations];
}
}
- (void)didTransitionToState:(UITableViewCellStateMask)state {
[super didTransitionToState:state];
if (!(state & UITableViewCellStateEditingMask) && !(state & UITableViewCellStateShowingDeleteConfirmationMask)) {
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.5];
label.alpha = 1.0;
[UIView commitAnimations];
}
}
+1 funciona en MonoTouch también. – tomfanning