Hi,
I am trying to fade a button in a UITableViewCell in and out on state
transitions, however the animation is not working: the button's alpha is
immediately set to 0.

Any help would be greatly appreciated, Thanks.

Code:

-(void) willTransitionToState:(UITableViewCellStateMask)state{

if(state == UITableViewCellStateEditingMask){

//About to enter the editing state

[UIView beginAnimations:@"Fade Out" context:nil];

[UIView setAnimationDuration:0.33 ];

self.unreadCount.alpha = 0.0;

[UIView commitAnimations];

}

 if (state == UITableViewCellStateDefaultMask) {

[UIView beginAnimations:@"Fade In" context:nil];

[UIView setAnimationDuration:0.33];

self.unreadCount.alpha = 1.0;

[UIView commitAnimations];

}

 [super willTransitionToState:state];

}
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to