NSTimer with userInfo
NSTimer with userInfo
- Subject: NSTimer with userInfo
- From: "Eric E. Dolecki" <email@hidden>
- Date: Tue, 12 May 2009 10:21:09 -0400
Hey all. I am looking for an example of using a NSTimer that sends along
specific data to the selector method - because I haven't been able to find
any examples online.
What I have is a didSelectRowAtIndexPath method, and I want to start the
cell animation selection... and then using a timer animate the deselection.
I need to tell the selector method enough to be able to do it.
Here are my 2 methods:
- (void)onTimer {
//? how to get enough data to be able to do something like this:
[tableView deselectRowAtIndexPath:indexPath animated:YES];
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(
NSIndexPath *)indexPath {
UITableViewCell *newCell = [tableView cellForRowAtIndexPath:indexPath];
UILabel *cellLabel = (UILabel *)[newCell.contentView viewWithTag:1];
[newCell setSelected:YES animated:YES];
// What do I use for userInfo?
[NSTimer scheduledTimerWithTimeInterval:0.3 target:self selector:@selector(
onTimer) userInfo:nil repeats:NO];
//[tableView deselectRowAtIndexPath:indexPath animated:YES];
}
Any help is always appreciated,
Eric
_______________________________________________
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