@@ -18,9 +18,9 @@ open class DropDown: UITextField {
18
18
19
19
@IBInspectable public var rowHeight : CGFloat = 30
20
20
@IBInspectable public var rowBackgroundColor : UIColor = . white
21
- @IBInspectable public var itemsColor : UIColor = . gray
21
+ @IBInspectable public var itemsColor : UIColor = . darkGray
22
22
@IBInspectable public var itemsTintColor : UIColor = . blue
23
- @IBInspectable public var selectedRowColor : UIColor = . cyan
23
+ @IBInspectable public var selectedRowColor : UIColor = . systemPink
24
24
@IBInspectable public var hideOptionsWhenSelect = true
25
25
@IBInspectable public var isSearchEnable : Bool = true {
26
26
didSet {
@@ -134,12 +134,18 @@ open class DropDown: UITextField {
134
134
135
135
func setupUI( ) {
136
136
let size = frame. height
137
- let rightView = UIView ( frame: CGRect ( x: 0.0 , y: 0.0 , width: size, height: size) )
138
- self . rightView = rightView
139
- rightViewMode = . always
140
- let arrowContainerView = UIView ( frame: rightView. frame)
141
- self . rightView? . addSubview ( arrowContainerView)
142
- let center = arrowContainerView. center
137
+ let arrowView = UIView ( frame: CGRect ( x: 0.0 , y: 0.0 , width: size, height: size) )
138
+ let arrowContainerView = UIView ( frame: arrowView. frame)
139
+ if semanticContentAttribute == . forceRightToLeft {
140
+ leftView = arrowView
141
+ leftViewMode = . always
142
+ leftView? . addSubview ( arrowContainerView)
143
+ } else {
144
+ rightView = arrowView
145
+ rightViewMode = . always
146
+ rightView? . addSubview ( arrowContainerView)
147
+ }
148
+
143
149
arrow = Arrow ( origin: CGPoint ( x: center. x - arrowSize / 2 , y: center. y - arrowSize / 2 ) , size: arrowSize)
144
150
arrowContainerView. addSubview ( arrow)
145
151
0 commit comments