Explorar o código

Work around SDK header typo

Tanner Bennett %!s(int64=6) %!d(string=hai) anos
pai
achega
c3801f2366
Modificáronse 1 ficheiros con 4 adicións e 2 borrados
  1. 4 2
      Classes/Utility/Categories/UIFont+FLEX.m

+ 4 - 2
Classes/Utility/Categories/UIFont+FLEX.m

@@ -24,7 +24,8 @@
 }
 
 + (UIFont *)flex_codeFont {
-    if (@available(iOS 12, *)) {
+    // 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];
@@ -32,7 +33,8 @@
 }
 
 + (UIFont *)flex_smallCodeFont {
-    if (@available(iOS 12, *)) {
+        // 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];