From b1471d4d20af9c842c2f892debc91d6fc8a4c1ed Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Mon, 25 Nov 2019 17:05:27 -0600 Subject: [PATCH] Adjust section header for hidden section on iPad. --- iOS/Settings/SettingsViewController.swift | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/iOS/Settings/SettingsViewController.swift b/iOS/Settings/SettingsViewController.swift index cde10c3a2..065d7e15f 100644 --- a/iOS/Settings/SettingsViewController.swift +++ b/iOS/Settings/SettingsViewController.swift @@ -106,6 +106,14 @@ class SettingsViewController: UITableViewController { } } + override func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? { + var adjustedSection = section + if traitCollection.userInterfaceIdiom != .phone && adjustedSection > 3 { + adjustedSection = adjustedSection + 1 + } + return super.tableView(tableView, titleForHeaderInSection: adjustedSection) + } + override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { var adjustedSection = indexPath.section if traitCollection.userInterfaceIdiom != .phone && adjustedSection > 3 {