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:
		
							
								
								
									
										43
									
								
								Tweaks/FLEX/Utility/Categories/UIFont+FLEX.m
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								Tweaks/FLEX/Utility/Categories/UIFont+FLEX.m
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,43 @@ | ||||
| // | ||||
| //  UIFont+FLEX.m | ||||
| //  FLEX | ||||
| // | ||||
| //  Created by Tanner Bennett on 12/20/19. | ||||
| //  Copyright © 2020 FLEX Team. All rights reserved. | ||||
| // | ||||
|  | ||||
| #import "UIFont+FLEX.h" | ||||
|  | ||||
| #define kFLEXDefaultCellFontSize 12.0 | ||||
|  | ||||
| @implementation UIFont (FLEX) | ||||
|  | ||||
| + (UIFont *)flex_defaultTableCellFont { | ||||
|     static UIFont *defaultTableCellFont = nil; | ||||
|     static dispatch_once_t onceToken; | ||||
|     dispatch_once(&onceToken, ^{ | ||||
|         defaultTableCellFont = [UIFont systemFontOfSize:kFLEXDefaultCellFontSize]; | ||||
|     }); | ||||
|  | ||||
|     return defaultTableCellFont; | ||||
| } | ||||
|  | ||||
| + (UIFont *)flex_codeFont { | ||||
|     // Actually only available in iOS 13, the SDK headers are wrong | ||||
|     if (@available(iOS 13, *)) { | ||||
|         return [self monospacedSystemFontOfSize:kFLEXDefaultCellFontSize weight:UIFontWeightRegular]; | ||||
|     } else { | ||||
|         return [self fontWithName:@"Menlo-Regular" size:kFLEXDefaultCellFontSize]; | ||||
|     } | ||||
| } | ||||
|  | ||||
| + (UIFont *)flex_smallCodeFont { | ||||
|         // Actually only available in iOS 13, the SDK headers are wrong | ||||
|     if (@available(iOS 13, *)) { | ||||
|         return [self monospacedSystemFontOfSize:self.smallSystemFontSize weight:UIFontWeightRegular]; | ||||
|     } else { | ||||
|         return [self fontWithName:@"Menlo-Regular" size:self.smallSystemFontSize]; | ||||
|     } | ||||
| } | ||||
|  | ||||
| @end | ||||
		Reference in New Issue
	
	Block a user
	 Balackburn
					Balackburn