| name | language | licence |
|---|---|---|
| NSTreeNode indexPathOfNodeWithRepresentedObject | Objective-C | MIT |
| Convert a number to text | Perl | MIT |
| Exact Table Cell Value Double-Clicked (through Bindings) | Objective-C | Other |
| Animating Progress Indicator in Menu | Objective-C | Other |
| NSDate Additions for Time Intervals since System Startup | Objective-C | Other |
| Pop Contextual Menu on standard button mouseDown: | Objective-C | Other |
| watchpoint for properties | Other | Other |
| NSObject executeAfterDelay:handler: | Objective-C | MIT |
< 1 2 3 4 >
language: Objective-C
licence: MIT
NSObject executeAfterDelay:handler:
options: view full snippet • send to code collector
#import <dispatch/dispatch.h>
@interface NSObject (BlockExtension)
-(void) executeAfterDelay:(NSTimeInterval)delay handler:(void (^)(void))handler;
@end
@implementation NSObject (BlockExtension)
-(void) executeAfterDelay:(NSTimeInterval)delay handler:(void (^)(void))handler
{
dispatch_after( dispatch_time( DISPATCH_TIME_NOW, delay * 1000000000 ),
dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_DEFAULT, 0 ),
handler );
}
@end



library
objective-c (22)