Polish the storyboard
- Set navigation titles in the storyboard, easier to find scenes now
This commit is contained in:
parent
73ab4f8759
commit
af9d4f1c24
10 changed files with 102 additions and 102 deletions
|
|
@ -18,7 +18,6 @@ class AboutRepositoryTableViewController: BasicStaticTableViewController {
|
|||
private let passwordStore = PasswordStore.shared
|
||||
|
||||
override func viewDidLoad() {
|
||||
navigationItemTitle = "About Repository"
|
||||
super.viewDidLoad()
|
||||
|
||||
indicator.center = CGPoint(x: view.bounds.midX, y: view.bounds.height * 0.382)
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ class AboutTableViewController: BasicStaticTableViewController {
|
|||
[[.title: "Open Source Components", .action: "segue", .link: "showOpenSourceComponentsSegue"],
|
||||
[.title: "Special Thanks", .action: "segue", .link: "showSpecialThanksSegue"],],
|
||||
]
|
||||
navigationItemTitle = "About"
|
||||
super.viewDidLoad()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ class AdvancedSettingsTableViewController: UITableViewController {
|
|||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
navigationItem.title = "Advanced"
|
||||
encryptInASCIIArmoredSwitch.isOn = Defaults[.encryptInArmored]
|
||||
encryptInASCIIArmoredTableViewCell.accessoryView = encryptInASCIIArmoredSwitch
|
||||
encryptInASCIIArmoredTableViewCell.selectionStyle = .none
|
||||
|
|
|
|||
|
|
@ -16,8 +16,6 @@ class CommitLogsTableViewController: UITableViewController {
|
|||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
commits = passwordStore.getRecentCommits(count: 20)
|
||||
navigationItem.title = "Recent Commit Logs"
|
||||
navigationController!.navigationBar.topItem!.title = "About"
|
||||
}
|
||||
|
||||
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,6 @@ class GeneralSettingsTableViewController: BasicStaticTableViewController {
|
|||
}()
|
||||
|
||||
override func viewDidLoad() {
|
||||
navigationItemTitle = "General"
|
||||
tableData = [
|
||||
// section 0
|
||||
[[.title: "About Repository", .action: "segue", .link: "showAboutRepositorySegue"],],
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ class GitSSHKeyArmorSettingTableViewController: UITableViewController, UITextVie
|
|||
@IBOutlet weak var armorPrivateKeyTextView: UITextView!
|
||||
var gitSSHPrivateKeyPassphrase: String?
|
||||
let passwordStore = PasswordStore.shared
|
||||
var doneBarButtonItem: UIBarButtonItem?
|
||||
|
||||
private var recentPastedText = ""
|
||||
|
||||
|
|
@ -24,12 +23,6 @@ class GitSSHKeyArmorSettingTableViewController: UITableViewController, UITextVie
|
|||
armorPrivateKeyTextView.text = Defaults[.gitSSHPrivateKeyArmor]
|
||||
gitSSHPrivateKeyPassphrase = passwordStore.gitSSHPrivateKeyPassphrase
|
||||
|
||||
doneBarButtonItem = UIBarButtonItem(title: "Done",
|
||||
style: UIBarButtonItemStyle.done,
|
||||
target: self,
|
||||
action: #selector(doneButtonTapped(_:)))
|
||||
navigationItem.rightBarButtonItem = doneBarButtonItem
|
||||
navigationItem.title = "SSH Key"
|
||||
armorPublicKeyTextView.delegate = self
|
||||
armorPrivateKeyTextView.delegate = self
|
||||
}
|
||||
|
|
@ -50,7 +43,7 @@ class GitSSHKeyArmorSettingTableViewController: UITableViewController, UITextVie
|
|||
return savePassphraseAlert
|
||||
}
|
||||
|
||||
func doneButtonTapped(_ sender: Any) {
|
||||
@IBAction func doneButtonTapped(_ sender: Any) {
|
||||
Defaults[.gitSSHPublicKeyArmor] = armorPublicKeyTextView.text
|
||||
Defaults[.gitSSHPrivateKeyArmor] = armorPrivateKeyTextView.text
|
||||
do {
|
||||
|
|
|
|||
|
|
@ -44,7 +44,6 @@ class OpenSourceComponentsTableViewController: BasicStaticTableViewController {
|
|||
[CellDataKey.title: item[0], CellDataKey.action: "link", CellDataKey.link: item[1], CellDataKey.accessoryType: UITableViewCellAccessoryType.detailDisclosureButton, CellDataKey.detailDisclosureAction: #selector(actOnDetailDisclosureButton(_:)), CellDataKey.detailDisclosureData: item[2]]
|
||||
)
|
||||
}
|
||||
navigationItemTitle = "Open Source Components"
|
||||
super.viewDidLoad()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,17 +20,10 @@ class SSHKeySettingTableViewController: UITableViewController {
|
|||
super.viewDidLoad()
|
||||
privateKeyURLTextField.text = Defaults[.gitSSHPrivateKeyURL]?.absoluteString
|
||||
publicKeyURLTextField.text = Defaults[.gitSSHPublicKeyURL]?.absoluteString
|
||||
var doneBarButtonItem: UIBarButtonItem?
|
||||
|
||||
doneBarButtonItem = UIBarButtonItem(title: "Done",
|
||||
style: UIBarButtonItemStyle.done,
|
||||
target: self,
|
||||
action: #selector(doneButtonTapped(_:)))
|
||||
navigationItem.rightBarButtonItem = doneBarButtonItem
|
||||
navigationItem.title = "SSH Key"
|
||||
}
|
||||
|
||||
func doneButtonTapped(_ sender: UIButton) {
|
||||
|
||||
@IBAction func doneButtonTapped(_ sender: UIButton) {
|
||||
guard let publicKeyURL = URL(string: publicKeyURLTextField.text!) else {
|
||||
Utils.alert(title: "Cannot Save", message: "Please set Public Key URL first.", controller: self, completion: nil)
|
||||
return
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ class SpecialThanksTableViewController: BasicStaticTableViewController {
|
|||
[CellDataKey.action: "link", CellDataKey.title: item[0], CellDataKey.link: item[1]]
|
||||
)
|
||||
}
|
||||
navigationItemTitle = "Special Thanks"
|
||||
super.viewDidLoad()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue