Use split view for Settings
This commit is contained in:
parent
d25cc9eb9a
commit
72424c7db2
7 changed files with 143 additions and 116 deletions
|
|
@ -88,9 +88,6 @@ class AdvancedSettingsTableViewController: UITableViewController {
|
|||
SharedDefaults[.encryptInArmored] = encryptInASCIIArmoredSwitch.isOn
|
||||
}
|
||||
|
||||
@IBAction func cancelGitConfigSetting(segue: UIStoryboardSegue) {
|
||||
}
|
||||
|
||||
@IBAction func saveGitConfigSetting(segue: UIStoryboardSegue) {
|
||||
if let controller = segue.source as? GitConfigSettingTableViewController {
|
||||
if let gitSignatureName = controller.nameTextField.text,
|
||||
|
|
|
|||
|
|
@ -204,9 +204,4 @@ class PGPKeyArmorSettingTableViewController: UITableViewController, UITextViewDe
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
@IBAction private func cancelPGPScanner(segue: UIStoryboardSegue) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -234,10 +234,6 @@ class PasswordEditorTableViewController: UITableViewController, FillPasswordTabl
|
|||
}
|
||||
}
|
||||
|
||||
@IBAction private func cancelOTPScanner(segue: UIStoryboardSegue) {
|
||||
|
||||
}
|
||||
|
||||
// update the data table after editing
|
||||
func textFieldDidEndEditing(_ textField: UITextField) {
|
||||
if textField == nameCell?.contentTextField {
|
||||
|
|
|
|||
24
pass/Controllers/SettingsSplitViewController.swift
Normal file
24
pass/Controllers/SettingsSplitViewController.swift
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
//
|
||||
// SettingsSplitViewController.swift
|
||||
// pass
|
||||
//
|
||||
// Created by Mingshen Sun on 6/21/17.
|
||||
// Copyright © 2017 Bob Sun. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class SettingsSplitViewController: UISplitViewController, UISplitViewControllerDelegate {
|
||||
override func viewDidLoad() {
|
||||
self.delegate = self
|
||||
self.preferredDisplayMode = .allVisible
|
||||
}
|
||||
|
||||
func splitViewController(
|
||||
_ splitViewController: UISplitViewController,
|
||||
collapseSecondary secondaryViewController: UIViewController,
|
||||
onto primaryViewController: UIViewController) -> Bool {
|
||||
// Return true to prevent UIKit from applying its default behavior
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
|
@ -28,9 +28,6 @@ class SettingsTableViewController: UITableViewController {
|
|||
@IBOutlet weak var passwordRepositoryTableViewCell: UITableViewCell!
|
||||
let passwordStore = PasswordStore.shared
|
||||
var passcodeLockConfig = PasscodeLockConfiguration.shared
|
||||
|
||||
@IBAction func cancelPGPKey(segue: UIStoryboardSegue) {
|
||||
}
|
||||
|
||||
@IBAction func savePGPKey(segue: UIStoryboardSegue) {
|
||||
if let controller = segue.source as? PGPKeySettingTableViewController {
|
||||
|
|
@ -117,9 +114,6 @@ class SettingsTableViewController: UITableViewController {
|
|||
}
|
||||
}
|
||||
|
||||
@IBAction func cancelGitServerSetting(segue: UIStoryboardSegue) {
|
||||
}
|
||||
|
||||
@IBAction func saveGitServerSetting(segue: UIStoryboardSegue) {
|
||||
self.passwordRepositoryTableViewCell.detailTextLabel?.text = SharedDefaults[.gitURL]?.host
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue