add authentication method selection UI

This commit is contained in:
Bob Sun 2017-01-25 18:28:37 +08:00
parent fcef83277f
commit cc7a53781c
No known key found for this signature in database
GPG key ID: 1F86BA2052FED3B4
9 changed files with 273 additions and 7 deletions

View file

@ -12,5 +12,24 @@ class SSHKeySettingFormViewController: FormViewController {
override func viewDidLoad() {
super.viewDidLoad()
let publicKeyURLTextFieldRow = TextFieldRowFormer<TextFieldTableViewCell>(instantiateType: .Nib(nibName: "TextFieldTableViewCell")) { (row: TextFieldTableViewCell) -> Void in
row.titleLabel.text = "SSH Public Key URL"
}.configure { (row) in
row.rowHeight = 52
}
let privateKeyURLTextFieldRow = TextFieldRowFormer<TextFieldTableViewCell>(instantiateType: .Nib(nibName: "TextFieldTableViewCell")) { (row: TextFieldTableViewCell) -> Void in
row.titleLabel.text = "SSH Private Key URL"
}.configure { (row) in
row.rowHeight = 52
}
let privateKeyPhassphraseTextFieldRow = TextFieldRowFormer<TextFieldTableViewCell>(instantiateType: .Nib(nibName: "TextFieldTableViewCell")) { (row: TextFieldTableViewCell) -> Void in
row.titleLabel.text = "Phassphrase"
row.textField.isSecureTextEntry = true
}.configure { (row) in
row.rowHeight = 52
}
former.append(sectionFormer: SectionFormer(rowFormer: publicKeyURLTextFieldRow, privateKeyURLTextFieldRow, privateKeyPhassphraseTextFieldRow))
}
}