I am animating the deselection of cell in a UITableView via
didSelectRowAtIndexPath (which works great), however the initial selection
I'd like to have animated to the selected state graphic I am using. Where
exactly should I set that up?
Here is my take on the selection & deselection:

- (void)onTimer:(NSTimer *)timer {

// Yes I know I am sending the tableView too, it's for potentially more
dynamic calls later

[table deselectRowAtIndexPath:[[timer userInfo] objectForKey:@"indexPath"]
animated:YES];

}


 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(
NSIndexPath *)indexPath {

 UITableViewCell *newCell = [tableView cellForRowAtIndexPath:indexPath];

UILabel *cellLabel = (UILabel *)[newCell.contentView viewWithTag:1];


 // THIS DOESN"T SEEM TO BE THE WAY TO DO IT - SET IT UP FIRST SOMEPLACE
ELSE?

[newCell setSelected:YES animated:YES];

 NSMutableDictionary *myDictionary = [[NSMutableDictionary alloc] init];

[myDictionary setObject:tableView forKey:@"table"];

[myDictionary setObject:indexPath forKey:@"indexPath"];

[NSTimer scheduledTimerWithTimeInterval:0.5 target:self selector:@selector(
onTimer:) userInfo:myDictionary repeats:NO];

[myDictionary release];

}


 Thanks for any and all replies,
Eric
_______________________________________________

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