瀏覽代碼

Fix FLEXTableView table header behavior on iOS 13

Tanner Bennett 7 年之前
父節點
當前提交
aa6bbfb7e7
共有 2 個文件被更改,包括 6 次插入4 次删除
  1. 4 4
      Classes/ObjectExplorers/Views/FLEXTableView.m
  2. 2 0
      FLEX.xcodeproj/project.pbxproj

+ 4 - 4
Classes/ObjectExplorers/Views/FLEXTableView.m

@@ -18,7 +18,7 @@
 
 - (CGFloat)_heightForHeaderInSection:(NSInteger)section {
     CGFloat height = [super _heightForHeaderInSection:section];
-    if (section == 0 && self.tableHeaderView) {
+    if (section == 0 && self.tableHeaderView && !@available(iOS 13.0, *)) {
         return height - self.tableHeaderView.frame.size.height + 8;
     }
 
@@ -30,9 +30,9 @@
     self = [super initWithFrame:frame style:style];
     if (self) {
         [self registerCells:@{
-            self.defaultReuseIdentifier: [FLEXTableViewCell class],
-            self.subtitleReuseIdentifier: [FLEXSubtitleTableViewCell class],
-            self.multilineReuseIdentifier: [FLEXMultilineTableViewCell class],
+            self.defaultReuseIdentifier : [FLEXTableViewCell class],
+            self.subtitleReuseIdentifier : [FLEXSubtitleTableViewCell class],
+            self.multilineReuseIdentifier : [FLEXMultilineTableViewCell class],
         }];
     }
 

+ 2 - 0
FLEX.xcodeproj/project.pbxproj

@@ -1251,6 +1251,7 @@
 				TARGETED_DEVICE_FAMILY = "1,2";
 				VERSIONING_SYSTEM = "apple-generic";
 				VERSION_INFO_PREFIX = "";
+				WARNING_CFLAGS = "-Wno-unsupported-availability-guard";
 			};
 			name = Debug;
 		};
@@ -1304,6 +1305,7 @@
 				VALIDATE_PRODUCT = YES;
 				VERSIONING_SYSTEM = "apple-generic";
 				VERSION_INFO_PREFIX = "";
+				WARNING_CFLAGS = "-Wno-unsupported-availability-guard";
 			};
 			name = Release;
 		};