TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Oct 2017 |
SwiftSwift Version | 3.0 |
SPMSupports SPM | ✗ |
Maintained by Leonardo Cardoso.
Simple extension to add a reveal button to your boring UITextField
If you prefer not to use either of the aforementioned dependency managers, you can integrate RevealTextField into your project manually.
You can use a RevealTextField
on any UITextField
by just calling the function revealable()
. Yes it’s an extension, not a subclass:
let passwordTextField = UITextField()
passwordTextField.isSecureTextEntry = true
passwordTextField.revealable() // <<---
passwordTextField.revealable(secureImage: UIImage?, // <<--- isSecureTextEntry == true.
unsecureImage: UIImage?, // <<--- isSecureTextEntry == false.
tintColor: UIColor?, // <<--- image color, default is black.
dimension: CGFloat?) // <<--- image dimension, default is 30.
revealable()
transforms your boring UITextField
into a Revealing UITextField
.toggleReveal()
toggles the review automatically at any time. It applies to every UITextField
.toggleImage(_ isSecure: Bool)
toggles revealing image at any time.RevealTextField is released under the MIT license. See LICENSE for details.