1
I have a text field, I have already been able to include an image on the right side, by clicking this I would like to reveal the password, however, I am not able to reach this result. The current code is:
import UIKit
class LoginViewController: UIViewController {
@IBOutlet weak var usuarioOuEmail: UITextField!
@IBOutlet weak var senha: UITextField!
@IBOutlet weak var mostrar: UIButton!
override func viewDidLoad() {
super.viewDidLoad()
let imageView = UIImageView();
imageView.image = UIImage(named: "logo.png")
imageView.frame = CGRectMake(0, 0, 23, 23);
senha.rightView = imageView
senha.rightViewMode = UITextFieldViewMode.Always
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
}
}
How do I click on the image to fire another function?
I did a test and had the same problem. From what I saw this is a bug to Uitextfield http://www.openradar.appspot.com/20345712
– Lucas Damiani