From b18f5741b0348f1bfa8ee0d3d37c9bf5fdd846dd Mon Sep 17 00:00:00 2001 From: Yishi Lin Date: Wed, 22 Mar 2017 01:57:51 +0800 Subject: [PATCH] Fix a bug about font --- pass/Views/FillPasswordTableViewCell.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pass/Views/FillPasswordTableViewCell.swift b/pass/Views/FillPasswordTableViewCell.swift index 75dfb9f..bffdea7 100644 --- a/pass/Views/FillPasswordTableViewCell.swift +++ b/pass/Views/FillPasswordTableViewCell.swift @@ -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) }