Compute heights of TableViewCells automatically
This is necessary because different languages need different amounts of space. Especially text fields with some more text need to be variable in their heights.
This commit is contained in:
parent
73a015616a
commit
8351c16d75
7 changed files with 56 additions and 36 deletions
|
|
@ -9,7 +9,7 @@
|
|||
import UIKit
|
||||
import passKit
|
||||
|
||||
class GitSSHKeyArmorSettingTableViewController: UITableViewController, UITextViewDelegate, QRScannerControllerDelegate {
|
||||
class GitSSHKeyArmorSettingTableViewController: AutoCellHeightUITableViewController, UITextViewDelegate, QRScannerControllerDelegate {
|
||||
@IBOutlet weak var armorPrivateKeyTextView: UITextView!
|
||||
@IBOutlet weak var scanPrivateKeyCell: UITableViewCell!
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
import UIKit
|
||||
import passKit
|
||||
|
||||
class PGPKeyArmorSettingTableViewController: UITableViewController, UITextViewDelegate, QRScannerControllerDelegate {
|
||||
class PGPKeyArmorSettingTableViewController: AutoCellHeightUITableViewController, UITextViewDelegate, QRScannerControllerDelegate {
|
||||
@IBOutlet weak var armorPublicKeyTextView: UITextView!
|
||||
@IBOutlet weak var armorPrivateKeyTextView: UITextView!
|
||||
@IBOutlet weak var scanPublicKeyCell: UITableViewCell!
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
import UIKit
|
||||
import passKit
|
||||
|
||||
class PGPKeySettingTableViewController: UITableViewController {
|
||||
class PGPKeySettingTableViewController: AutoCellHeightUITableViewController {
|
||||
|
||||
@IBOutlet weak var pgpPublicKeyURLTextField: UITextField!
|
||||
@IBOutlet weak var pgpPrivateKeyURLTextField: UITextField!
|
||||
|
|
@ -18,7 +18,6 @@ class PGPKeySettingTableViewController: UITableViewController {
|
|||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
tableView.rowHeight = UITableViewAutomaticDimension
|
||||
pgpPublicKeyURLTextField.text = SharedDefaults[.pgpPublicKeyURL]?.absoluteString
|
||||
pgpPrivateKeyURLTextField.text = SharedDefaults[.pgpPrivateKeyURL]?.absoluteString
|
||||
pgpPassphrase = passwordStore.pgpKeyPassphrase
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import UIKit
|
|||
import SVProgressHUD
|
||||
import passKit
|
||||
|
||||
class SSHKeySettingTableViewController: UITableViewController {
|
||||
class SSHKeySettingTableViewController: AutoCellHeightUITableViewController {
|
||||
|
||||
@IBOutlet weak var privateKeyURLTextField: UITextField!
|
||||
let passwordStore = PasswordStore.shared
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue