solve core data conflict caused by updating password entity image
This commit is contained in:
parent
f1b14d794d
commit
83b9762122
2 changed files with 26 additions and 1 deletions
|
|
@ -178,7 +178,9 @@ class PasswordDetailTableViewController: UITableViewController, UIGestureRecogni
|
|||
self?.passwordImage = image
|
||||
self?.tableView.reloadRows(at: [indexPath], with: UITableViewRowAnimation.automatic)
|
||||
let imageData = UIImageJPEGRepresentation(image, 1)
|
||||
self?.passwordEntity?.setValue(imageData, forKey: "image")
|
||||
if let entity = self?.passwordEntity {
|
||||
PasswordStore.shared.updateImage(passwordEntity: entity, image: imageData)
|
||||
}
|
||||
case .failure(let error):
|
||||
print(error)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue