Fix a bug about font

This commit is contained in:
Yishi Lin 2017-03-22 01:57:51 +08:00
parent 93901ec010
commit b18f5741b0

View file

@ -20,6 +20,7 @@ class FillPasswordTableViewCell: ContentTableViewCell {
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
contentTextField.font = UIFont(name: Globals.passwordFonts, size: (contentTextField.font?.pointSize)!)
}
override func setSelected(_ selected: Bool, animated: Bool) {
@ -30,7 +31,7 @@ class FillPasswordTableViewCell: ContentTableViewCell {
@IBAction func generatePassword(_ sender: UIButton) {
let plainPassword = self.delegate?.generatePassword() ?? Utils.generatePassword(length: 16)
contentTextField.attributedText = Utils.attributedPassword(plainPassword: plainPassword)
self.setContent(content: plainPassword)
Utils.copyToPasteboard(textToCopy: plainPassword)
}