You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Question though; I want to set a custom rightView on one of my TextFields, but when I do so the rightView also scrolls down when the custom errorMessage, displayed below the line, is animated.
Note: I use the component in a swift project using a bridging header.
My code to set the custom rightView: let eyeButton = UIButton(type: .custom) eyeButton.setImage(UIImage(named: "icon_eye"), for: .normal) eyeButton.imageEdgeInsets = UIEdgeInsetsMake(0, -16, 0, 0) eyeButton.frame = CGRect(x: CGFloat(passwordTextField.frame.size.width - 16), y:(passwordTextField.frame.size.height - 16) / 2, width: CGFloat(16), height: CGFloat(16)) eyeButton.addTarget(self, action: #selector(self.togglePassword), for: .touchUpInside) passwordTextField.rightViewMode = UITextFieldViewMode.always passwordTextField.rightView = eyeButton
The setup of the MFTextField itself it pretty straightforward, using properties like underlineColor, placeholderFont etc.
Can someone verify this behaviour?
Cheers, Raoul.
The text was updated successfully, but these errors were encountered:
Hi,
Awesome component!
Question though; I want to set a custom rightView on one of my TextFields, but when I do so the rightView also scrolls down when the custom errorMessage, displayed below the line, is animated.
Note: I use the component in a swift project using a bridging header.
My code to set the custom rightView:
let eyeButton = UIButton(type: .custom)
eyeButton.setImage(UIImage(named: "icon_eye"), for: .normal)
eyeButton.imageEdgeInsets = UIEdgeInsetsMake(0, -16, 0, 0)
eyeButton.frame = CGRect(x: CGFloat(passwordTextField.frame.size.width - 16), y:(passwordTextField.frame.size.height - 16) / 2, width: CGFloat(16), height: CGFloat(16))
eyeButton.addTarget(self, action: #selector(self.togglePassword), for: .touchUpInside)
passwordTextField.rightViewMode = UITextFieldViewMode.always
passwordTextField.rightView = eyeButton
The setup of the MFTextField itself it pretty straightforward, using properties like underlineColor, placeholderFont etc.
Can someone verify this behaviour?
Cheers, Raoul.
The text was updated successfully, but these errors were encountered: