Fade out button in willTransitionToState of UITableViewCell
Fade out button in willTransitionToState of UITableViewCell
- Subject: Fade out button in willTransitionToState of UITableViewCell
- From: James Wardle <email@hidden>
- Date: Sun, 11 Oct 2009 15:25:29 +0100
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 (email@hidden)
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:
This email sent to email@hidden