Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Category - Perform Block After Delay
#import "NSObject+PWObject.h"
@implementation NSObject (PWObject)
- (void)performBlock:(void (^)(void))block afterDelay:(NSTimeInterval)delay {
int64_t delta = (int64_t)(1.0e9 * delay);
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, delta), dispatch_get_main_queue(), block);
#import <Foundation/Foundation.h>
@interface NSObject (PWObject)
- (void)performBlock:(void (^)(void))block afterDelay:(NSTimeInterval)delay;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.