Skip to content

Commit b4ed936

Browse files
committed
comment code on setSecureMode
1 parent ad55b4f commit b4ed936

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

PasswordTextField/PasswordTextField.swift

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,16 +174,18 @@ open class PasswordTextField: UITextField {
174174
*/
175175
open func setSecureMode(_ secure:Bool)
176176
{
177-
178-
self.resignFirstResponder()
177+
178+
// Note by Camilo: it cause weird animation.
179+
//self.resignFirstResponder()
179180
self.isSecureTextEntry = secure
180181

181182
/// Kind of ugly hack to make the text refresh after the toggle. The size of the secure fonts are different than the normal ones and it shows trailing white space
182183
let tempText = self.text;
183184
self.text = " ";
184185
self.text = tempText;
185-
186-
self.becomeFirstResponder()
186+
187+
// Note by Camilo: it cause weird animation.
188+
//self.becomeFirstResponder()
187189

188190
}
189191

0 commit comments

Comments
 (0)