Re: NSTimer with userInfo
Re: NSTimer with userInfo
- Subject: Re: NSTimer with userInfo
- From: "I. Savant" <email@hidden>
- Date: Tue, 12 May 2009 10:42:43 -0400
On Tue, May 12, 2009 at 10:39 AM, Eric E. Dolecki <email@hidden> wrote:
> Okay, so I have this...
>
> [NSTimer scheduledTimerWithTimeInterval:0.2 target:selfselector:@selector(onTimer:) userInfo:nil repeats:NO];
>
> And then my selector looks like this:
> - (void)onTimer:(NSTimer *)timer {
> NSLog(@"%@", [timer userInfo] );
> }
Looks right to me.
> Now, all I might need to do is to somehow package up the tableView and the
> indexPath and stuff that into something and declare that as the userInfo?
> And what might that look like?
It would look like my previous response suggested. Use those
collection classes (NSDictionary, NSArray, etc.). In your case, I'd
use a dictionary with your table as the key "table", the index path as
key "indexPath", etc.
Consult the documentation if you're unfamiliar with NSDictionary /
NSMutableDictionary.
--
I.S.
_______________________________________________
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