Adjust section header for hidden section on iPad.

This commit is contained in:
Maurice Parker 2019-11-25 17:05:27 -06:00
parent c17999de76
commit b1471d4d20
1 changed files with 8 additions and 0 deletions

View File

@ -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 {