mirror of
				https://github.com/SoPat712/YTLitePlus.git
				synced 2025-10-31 12:54:14 -04:00 
			
		
		
		
	added files via upload
This commit is contained in:
		
							
								
								
									
										31
									
								
								Tweaks/FLEX/Utility/Categories/UIPasteboard+FLEX.m
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								Tweaks/FLEX/Utility/Categories/UIPasteboard+FLEX.m
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,31 @@ | ||||
| // | ||||
| //  UIPasteboard+FLEX.m | ||||
| //  FLEX | ||||
| // | ||||
| //  Created by Tanner Bennett on 12/9/19. | ||||
| //  Copyright © 2020 FLEX Team. All rights reserved. | ||||
| // | ||||
|  | ||||
| #import "UIPasteboard+FLEX.h" | ||||
|  | ||||
| @implementation UIPasteboard (FLEX) | ||||
|  | ||||
| - (void)flex_copy:(id)object { | ||||
|     if (!object) { | ||||
|         return; | ||||
|     } | ||||
|      | ||||
|     if ([object isKindOfClass:[NSString class]]) { | ||||
|         UIPasteboard.generalPasteboard.string = object; | ||||
|     } else if([object isKindOfClass:[NSData class]]) { | ||||
|         [UIPasteboard.generalPasteboard setData:object forPasteboardType:@"public.data"]; | ||||
|     } else if ([object isKindOfClass:[NSNumber class]]) { | ||||
|         UIPasteboard.generalPasteboard.string = [object stringValue]; | ||||
|     } else { | ||||
|         // TODO: make this an alert instead of an exception | ||||
|         [NSException raise:NSInternalInconsistencyException | ||||
|                     format:@"Tried to copy unsupported type: %@", [object class]]; | ||||
|     } | ||||
| } | ||||
|  | ||||
| @end | ||||
		Reference in New Issue
	
	Block a user
	 Balackburn
					Balackburn