Type Method

scheduledTimerWithTimeInterval:invocation:repeats:

Creates a new timer and schedules it on the current run loop in the default mode.

Declaration

+ (NSTimer *)scheduledTimerWithTimeInterval:(NSTimeInterval)ti invocation:(NSInvocation *)invocation repeats:(BOOL)yesOrNo;

Parameters

ti

The number of seconds between firings of the timer. If ti is less than or equal to 0.0, this method chooses the nonnegative value of 0.1 milliseconds instead.

invocation

The invocation to use when the timer fires. The invocation object maintains a strong reference to its arguments until the timer is invalidated.

repeats

If YES, the timer will repeatedly reschedule itself until invalidated. If NO, the timer will be invalidated after it fires.

Return Value

A new NSTimer object, configured according to the specified parameters.

Discussion

After ti seconds have elapsed, the timer fires, invoking invocation.

See Also

Creating a Timer

scheduledTimerWithTimeInterval:repeats:block:

Creates a timer and schedules it on the current run loop in the default mode.

scheduledTimerWithTimeInterval:target:selector:userInfo:repeats:

Creates a timer and schedules it on the current run loop in the default mode.

timerWithTimeInterval:repeats:block:

Initializes a timer object with the specified time interval and block.

timerWithTimeInterval:target:selector:userInfo:repeats:

Initializes a timer object with the specified object and selector.

timerWithTimeInterval:invocation:repeats:

Initializes a timer object with the specified invocation object.

initWithFireDate:interval:repeats:block:

Initializes a timer for the specified date and time interval with the specified block.

initWithFireDate:interval:target:selector:userInfo:repeats:

Initializes a timer using the specified object and selector.