Fix a cell reuse bug in password detail VC

This commit is contained in:
Yishi Lin 2017-05-08 20:57:39 +08:00
parent 22877c8012
commit a6875590a4

View file

@ -62,9 +62,11 @@ class LabelTableViewCell: UITableViewCell {
case "url":
type = .URL
contentLabel.text = content
contentLabel.font = UIFont.systemFont(ofSize: contentLabel.font.pointSize)
default:
type = .other
contentLabel.text = content
contentLabel.font = UIFont.systemFont(ofSize: contentLabel.font.pointSize)
}
updateButtons()
}
@ -80,13 +82,6 @@ class LabelTableViewCell: UITableViewCell {
super.awakeFromNib()
}
override func layoutSubviews() {
super.layoutSubviews()
if buttons != nil {
self.accessoryView = buttons
}
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
}
@ -208,5 +203,6 @@ class LabelTableViewCell: UITableViewCell {
passwordDisplayButton = nil
buttons = nil
}
self.accessoryView = buttons
}
}