mirror of
				https://github.com/SoPat712/YTLitePlus.git
				synced 2025-10-31 04:44:14 -04:00 
			
		
		
		
	added files via upload
This commit is contained in:
		
							
								
								
									
										25
									
								
								Tweaks/FLEX/Utility/Categories/NSTimer+FLEX.m
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								Tweaks/FLEX/Utility/Categories/NSTimer+FLEX.m
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,25 @@ | ||||
| // | ||||
| //  NSTimer+Blocks.m | ||||
| //  FLEX | ||||
| // | ||||
| //  Created by Tanner on 3/23/17. | ||||
| // | ||||
|  | ||||
| #import "NSTimer+FLEX.h" | ||||
|  | ||||
| @interface Block : NSObject | ||||
| - (void)invoke; | ||||
| @end | ||||
|  | ||||
| #pragma clang diagnostic ignored "-Wincomplete-implementation" | ||||
| @implementation NSTimer (Blocks) | ||||
|  | ||||
| + (instancetype)flex_fireSecondsFromNow:(NSTimeInterval)delay block:(VoidBlock)block { | ||||
|     if (@available(iOS 10, *)) { | ||||
|         return [self scheduledTimerWithTimeInterval:delay repeats:NO block:(id)block]; | ||||
|     } else { | ||||
|         return [self scheduledTimerWithTimeInterval:delay target:block selector:@selector(invoke) userInfo:nil repeats:NO]; | ||||
|     } | ||||
| } | ||||
|  | ||||
| @end | ||||
		Reference in New Issue
	
	Block a user
	 Balackburn
					Balackburn