Commit 71bdc3ea by Daniel Dahan

added normal state to buttons

parent a458553c
......@@ -110,7 +110,8 @@ public class NavigationController : UINavigationController, UIGestureRecognizerD
if let v: NavigationBar = navigationBar as? NavigationBar {
let backButton: IconButton = IconButton()
backButton.pulseColor = Color.white
backButton.setImage(v.backButtonImage, for: .highlighted)
backButton.setImage(v.backButtonImage, for: .normal)
backButton.setImage(v.backButtonImage, for: .highlighted)
backButton.addTarget(self, action: #selector(handleBackButton), for: .touchUpInside)
if var c: Array<UIControl> = item.leftControls {
......
......@@ -163,7 +163,8 @@ public class SearchBar : BarView {
clearButton = IconButton()
clearButton.contentEdgeInsets = UIEdgeInsets.zero
clearButton.tintColor = placeholderColor
clearButton.setImage(image, for: .highlighted)
clearButton.setImage(image, for: .normal)
clearButton.setImage(image, for: .highlighted)
clearButtonAutoHandleEnabled = true
textField.clearButtonMode = .never
textField.rightViewMode = .whileEditing
......
......@@ -230,7 +230,8 @@ public class TextField: UITextField {
clearIconButton!.contentEdgeInsets = UIEdgeInsets.zero
clearIconButton!.pulseAnimation = .center
clearIconButton!.tintColor = placeholderColor
clearIconButton!.setImage(image, for: .highlighted)
clearIconButton!.setImage(image, for: .normal)
clearIconButton!.setImage(image, for: .highlighted)
clearButtonMode = .never
rightViewMode = .whileEditing
rightView = clearIconButton
......@@ -266,7 +267,8 @@ public class TextField: UITextField {
visibilityIconButton!.contentEdgeInsets = UIEdgeInsets.zero
visibilityIconButton!.pulseAnimation = .center
visibilityIconButton!.tintColor = placeholderColor
visibilityIconButton!.setImage(image, for: .highlighted)
visibilityIconButton!.setImage(image, for: .normal)
visibilityIconButton!.setImage(image, for: .highlighted)
visibilityIconButton!.tintColor = placeholderColor.withAlphaComponent(isSecureTextEntry ? 0.38 : 0.54)
isSecureTextEntry = true
clearButtonMode = .never
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment