Casting cell class to parent cell class will trigger the crash.
This commit is contained in:
Bob Sun 2017-03-15 23:03:43 -07:00
parent f573be9ee0
commit 5dd741f6fa
No known key found for this signature in database
GPG key ID: 1F86BA2052FED3B4

View file

@ -34,7 +34,7 @@ class AddPasswordTableViewController: PasswordEditorTableViewController {
return false
}
// check name
let nameCell = tableView.cellForRow(at: IndexPath(row: 0, section: 0)) as! ContentTableViewCell
let nameCell = tableView.cellForRow(at: IndexPath(row: 0, section: 0)) as! TextFieldTableViewCell
if nameCell.getContent()!.isEmpty {
let alertTitle = "Cannot Add Password"
let alertMessage = "Please fill in the name."