Reduce height of password generator settings cells

This commit is contained in:
Danny Moesch 2020-03-07 21:37:58 +01:00 committed by Mingshen Sun
parent cecf38b5b3
commit 15324af03c
2 changed files with 14 additions and 4 deletions

View file

@ -207,6 +207,17 @@ class PasswordEditorTableViewController: UITableViewController {
return 44
}
override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
switch tableData[indexPath.section][indexPath.row][PasswordEditorCellKey.type] as! PasswordEditorCellType {
case .passwordLengthCell, .passwordGroupsCell:
return 42
case .passwordUseDigitsCell, .passwordVaryCasesCell, .passwordUseSpecialSymbols, .passwordFlavorCell:
return 42
default:
return UITableView.automaticDimension
}
}
override func numberOfSections(in tableView: UITableView) -> Int {
return tableData.count
}