Run block of code after specified delay

June 26, 2013

Brian Coleman writes a short tutorial on how to run a block of code after a specified delay. The original code, courtesy Duncan C, is written as a category on NSObject class.

An example follows:

[self performBlock:^{code here} afterDelay: 2.5];
[self performBlock:^{code here} afterDelay: 10];