• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTimer with userInfo
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTimer with userInfo


  • Subject: Re: NSTimer with userInfo
  • From: "I. Savant" <email@hidden>
  • Date: Tue, 12 May 2009 10:28:56 -0400

On Tue, May 12, 2009 at 10:21 AM, Eric E. Dolecki <email@hidden> wrote:

> Here are my 2 methods:
>
> - (void)onTimer {

...

> [NSTimer scheduledTimerWithTimeInterval:0.3 target:self selector:@selector(
> onTimer) userInfo:nil repeats:NO];

 Ah. I see your confusion. Take another look at the documentation for
-[NSTimer scheduledTimerWithTimeInterval:target:selector:userInfo:repeats]
... look at the example selector. You're specifying a selector (
onTimer ) that takes no arguments. Your selector should be "onTimer:"
and it should accept a timer as its argument (don't forget to change
both the method signature *and* the specified selector when setting up
the timer). You'll then ask the passed-in timer (you read that
documentation, right?) for its -userInfo.

--
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

  • Follow-Ups:
    • Re: NSTimer with userInfo
      • From: "Eric E. Dolecki" <email@hidden>
References: 
 >NSTimer with userInfo (From: "Eric E. Dolecki" <email@hidden>)

  • Prev by Date: Re: NSTimer with userInfo
  • Next by Date: Re: Resolution Independent View?
  • Previous by thread: Re: NSTimer with userInfo
  • Next by thread: Re: NSTimer with userInfo
  • Index(es):
    • Date
    • Thread