Skip to content

Instantly share code, notes, and snippets.

@taka328w
Created April 28, 2012 14:42
Show Gist options
  • Save taka328w/2519558 to your computer and use it in GitHub Desktop.
Save taka328w/2519558 to your computer and use it in GitHub Desktop.
NSObject+Extensions.h
@interface NSObject (Extensions)
typedef void (^VoidBlock)(void);
- (void)performBlock:(VoidBlock)block;
- (void)performBlock:(VoidBlock)block afterDelay:(NSTimeInterval)delay;
- (void)performBlockOnMainThread:(VoidBlock)block;
- (void)performBlockOnMainThread:(VoidBlock)block afterDelay:(NSTimeInterval)delay;
- (void)performBlockInBackground:(VoidBlock)block;
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment