Commit 71bdc3ea by Daniel Dahan

added normal state to buttons

parent a458553c
...@@ -110,7 +110,8 @@ public class NavigationController : UINavigationController, UIGestureRecognizerD ...@@ -110,7 +110,8 @@ public class NavigationController : UINavigationController, UIGestureRecognizerD
if let v: NavigationBar = navigationBar as? NavigationBar { if let v: NavigationBar = navigationBar as? NavigationBar {
let backButton: IconButton = IconButton() let backButton: IconButton = IconButton()
backButton.pulseColor = Color.white 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) backButton.addTarget(self, action: #selector(handleBackButton), for: .touchUpInside)
if var c: Array<UIControl> = item.leftControls { if var c: Array<UIControl> = item.leftControls {
......
...@@ -163,7 +163,8 @@ public class SearchBar : BarView { ...@@ -163,7 +163,8 @@ public class SearchBar : BarView {
clearButton = IconButton() clearButton = IconButton()
clearButton.contentEdgeInsets = UIEdgeInsets.zero clearButton.contentEdgeInsets = UIEdgeInsets.zero
clearButton.tintColor = placeholderColor clearButton.tintColor = placeholderColor
clearButton.setImage(image, for: .highlighted) clearButton.setImage(image, for: .normal)
clearButton.setImage(image, for: .highlighted)
clearButtonAutoHandleEnabled = true clearButtonAutoHandleEnabled = true
textField.clearButtonMode = .never textField.clearButtonMode = .never
textField.rightViewMode = .whileEditing textField.rightViewMode = .whileEditing
......
...@@ -230,7 +230,8 @@ public class TextField: UITextField { ...@@ -230,7 +230,8 @@ public class TextField: UITextField {
clearIconButton!.contentEdgeInsets = UIEdgeInsets.zero clearIconButton!.contentEdgeInsets = UIEdgeInsets.zero
clearIconButton!.pulseAnimation = .center clearIconButton!.pulseAnimation = .center
clearIconButton!.tintColor = placeholderColor clearIconButton!.tintColor = placeholderColor
clearIconButton!.setImage(image, for: .highlighted) clearIconButton!.setImage(image, for: .normal)
clearIconButton!.setImage(image, for: .highlighted)
clearButtonMode = .never clearButtonMode = .never
rightViewMode = .whileEditing rightViewMode = .whileEditing
rightView = clearIconButton rightView = clearIconButton
...@@ -266,7 +267,8 @@ public class TextField: UITextField { ...@@ -266,7 +267,8 @@ public class TextField: UITextField {
visibilityIconButton!.contentEdgeInsets = UIEdgeInsets.zero visibilityIconButton!.contentEdgeInsets = UIEdgeInsets.zero
visibilityIconButton!.pulseAnimation = .center visibilityIconButton!.pulseAnimation = .center
visibilityIconButton!.tintColor = placeholderColor 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) visibilityIconButton!.tintColor = placeholderColor.withAlphaComponent(isSecureTextEntry ? 0.38 : 0.54)
isSecureTextEntry = true isSecureTextEntry = true
clearButtonMode = .never 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