Skip to content

Commit

Permalink
feat: add proper titles for advanced controller
Browse files Browse the repository at this point in the history
  • Loading branch information
khcrysalis committed Sep 30, 2024
1 parent 2bf9638 commit 5a45709
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions iOS/Views/Apps/Signing/AppSigningAdvancedViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,24 @@ class AppSigningAdvancedViewController: UITableViewController {
return 3
}

override func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
switch section {
case 0: return String.localized("APP_SIGNING_INPUT_VIEW_CONTROLLER_SECTION_TITLE_APPEARENCE")
case 1: return String.localized("APP_SIGNING_INPUT_VIEW_CONTROLLER_SECTION_TITLE_MINIMUM_APP_VERSION")
case 2: return String.localized("APP_SIGNING_INPUT_VIEW_CONTROLLER_SECTION_TITLE_PROPERTIES")
default: return nil
}
override func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {

let titles = [
String.localized("APP_SIGNING_INPUT_VIEW_CONTROLLER_SECTION_TITLE_APPEARENCE"),
String.localized("APP_SIGNING_INPUT_VIEW_CONTROLLER_SECTION_TITLE_MINIMUM_APP_VERSION"),
String.localized("APP_SIGNING_INPUT_VIEW_CONTROLLER_SECTION_TITLE_PROPERTIES")
][section]

let headerView = InsetGroupedSectionHeader(title: titles)
return headerView
}

override func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
return [
40,
40,
40
][section]
}

override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
Expand Down

0 comments on commit 5a45709

Please sign in to comment.