passforios/pass/SSHKeySettingFormViewController.swift

36 lines
1.4 KiB
Swift
Raw Normal View History

2017-01-24 16:57:38 +08:00
//
// SSHKeySettingFormViewController.swift
// pass
//
// Created by Mingshen Sun on 24/1/2017.
// Copyright © 2017 Bob Sun. All rights reserved.
//
import Former
class SSHKeySettingFormViewController: FormViewController {
override func viewDidLoad() {
super.viewDidLoad()
2017-01-25 18:28:37 +08:00
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))
2017-01-24 16:57:38 +08:00
}
}