animate textlabel in uitableviewcell using willTransitionToState
<p>I am trying to animate the textlabel in a UItableviewcell when I press the edit button.
I am trying to make it fade out and fade in.
fading in works but when I press 'edit' the textlabel disappears and when I press on 'done' I fades in just perfectly.</p>

<p>Can anyone tell me why it isn't working?</p>

<p>thanks in advance</p>

<pre><code>- (void)willTransitionToState:(UITableViewCellStateMask)state {
 [super willTransitionToState:state];

 if ((state &amp; UITableViewCellStateEditingMask) || (state &amp; 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 &amp; UITableViewCellStateEditingMask) &amp;&amp; !(state &amp; UITableViewCellStateShowingDeleteConfirmationMask)) {
  [UIView beginAnimations:nil context:NULL];
  [UIView setAnimationDuration:0.5];
  label.alpha = 1.0;
  [UIView commitAnimations];
 }
}
</code></pre>
