소스 검색

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;
 		};