finish simple "add password function"

This commit is contained in:
Bob Sun 2017-02-10 22:15:01 +08:00
parent cbbb631e08
commit b954a4dcab
No known key found for this signature in database
GPG key ID: 1F86BA2052FED3B4
13 changed files with 314 additions and 26 deletions

View file

@ -27,6 +27,15 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV
@IBOutlet weak var tableView: UITableView!
@IBAction func cancelAddPassword(segue: UIStoryboardSegue) {
}
@IBAction func saveAddPassword(segue: UIStoryboardSegue) {
if let controller = segue.source as? AddPasswordTableViewController {
PasswordStore.shared.add(password: controller.password!)
NotificationCenter.default.post(Notification(name: Notification.Name("passwordUpdated")))
}
}
func syncPasswords() {
SVProgressHUD.setDefaultMaskType(.black)
SVProgressHUD.setDefaultStyle(.light)