Przeglądaj źródła

Comment out table view _heightForHeaderInSection

Tanner Bennett 6 lat temu
rodzic
commit
799e3b2a88
1 zmienionych plików z 24 dodań i 14 usunięć
  1. 24 14
      Classes/ObjectExplorers/Views/FLEXTableView.m

+ 24 - 14
Classes/ObjectExplorers/Views/FLEXTableView.m

@@ -38,20 +38,30 @@ FLEXTableViewCellReuseIdentifier const kFLEXCodeFontCell = @"kFLEXCodeFontCell";
     return [[self alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped];
     return [[self alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped];
 #endif
 #endif
 }
 }
-
-- (CGFloat)_heightForHeaderInSection:(NSInteger)section {
-    CGFloat height = [super _heightForHeaderInSection:section];
-    if (section == 0 && self.tableHeaderView) {
-        NSString *title = [self _titleForHeaderInSection:section];
-        if (!@available(iOS 13, *)) {
-            return height - self.tableHeaderView.frame.size.height + 8;
-        } else if ([title isEqualToString:@" "]) {
-            return height - self.tableHeaderView.frame.size.height + 5;
-        }
-    }
-
-    return height;
-}
+//
+//- (CGFloat)_heightForHeaderInSection:(NSInteger)section {
+//    CGFloat height = [super _heightForHeaderInSection:section];
+//    if (section == 0) {
+//        NSString *title = [self _titleForHeaderInSection:section];
+//        if (self.tableHeaderView) {
+//            if (!@available(iOS 13, *)) {
+//                return height - self.tableHeaderView.frame.size.height + 8;
+//            }
+//            // On iOS 13, returning an empty title for the table view
+//            // messes with the height of the table view later on.
+//            // We return a space to work around this.
+//            else if ([title isEqualToString:@" "]) {
+//                return height - self.tableHeaderView.frame.size.height + 5;
+//            }
+//        } else {
+//            if (@available(iOS 13, *) && [title isEqualToString:@" "]) {
+//                return 5;
+//            }
+//        }
+//    }
+//
+//    return height;
+//}
 
 
 #pragma mark - Initialization
 #pragma mark - Initialization