Declared in NSTimer+Blocks.h

Overview

A category on NSTimer allowing the NSTimer object to execute a block when fired

Tasks

Class Methods

scheduledTimerWithTimeInterval:block:repeats:

Creates and returns a new NSTimer object and schedules it on the current run loop in the default mode.

+ (id)scheduledTimerWithTimeInterval:(NSTimeInterval)inTimeInterval block:(void ( ^ ) ( ))inBlock repeats:(BOOL)inRepeats

Parameters

inTimeInterval

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

inBlock

The block to use when the timer fires.

inRepeats

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

Declared In

NSTimer+Blocks.h

timerWithTimeInterval:block:repeats:

Creates and returns a new NSTimer object initialized with the specified invocation object.

+ (id)timerWithTimeInterval:(NSTimeInterval)inTimeInterval block:(void ( ^ ) ( ))inBlock repeats:(BOOL)inRepeats

Parameters

inTimeInterval

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

inBlock

The block to use when the timer fires.

inRepeats

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

Declared In

NSTimer+Blocks.h