only prepare saveEditPasswordSegue
This commit is contained in:
parent
286f90b92e
commit
ae93727c6b
1 changed files with 10 additions and 8 deletions
|
|
@ -39,15 +39,17 @@ class EditPasswordTableViewController: PasswordEditorTableViewController {
|
||||||
}
|
}
|
||||||
|
|
||||||
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
|
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
|
||||||
let cells = tableView.visibleCells
|
if segue.identifier == "saveEditPasswordSegue" {
|
||||||
var cellContents = [String: String]()
|
let cells = tableView.visibleCells
|
||||||
for cell in cells {
|
var cellContents = [String: String]()
|
||||||
let indexPath = tableView.indexPath(for: cell)!
|
for cell in cells {
|
||||||
let contentCell = cell as! ContentTableViewCell
|
let indexPath = tableView.indexPath(for: cell)!
|
||||||
let cellTitle = tableData[indexPath.section][indexPath.row][.title] as! String
|
let contentCell = cell as! ContentTableViewCell
|
||||||
cellContents[cellTitle] = contentCell.getContent()!
|
let cellTitle = tableData[indexPath.section][indexPath.row][.title] as! String
|
||||||
|
cellContents[cellTitle] = contentCell.getContent()!
|
||||||
|
}
|
||||||
|
password!.updatePassword(name: cellContents["name"]!, plainText: "\(cellContents["password"]!)\n\(cellContents["additions"]!)")
|
||||||
}
|
}
|
||||||
password!.updatePassword(name: cellContents["name"]!, plainText: "\(cellContents["password"]!)\n\(cellContents["additions"]!)")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue