@@ -18,9 +18,9 @@ open class DropDown: UITextField {
1818
1919 @IBInspectable public var rowHeight : CGFloat = 30
2020 @IBInspectable public var rowBackgroundColor : UIColor = . white
21- @IBInspectable public var itemsColor : UIColor = . gray
21+ @IBInspectable public var itemsColor : UIColor = . darkGray
2222 @IBInspectable public var itemsTintColor : UIColor = . blue
23- @IBInspectable public var selectedRowColor : UIColor = . cyan
23+ @IBInspectable public var selectedRowColor : UIColor = . systemPink
2424 @IBInspectable public var hideOptionsWhenSelect = true
2525 @IBInspectable public var isSearchEnable : Bool = true {
2626 didSet {
@@ -134,12 +134,18 @@ open class DropDown: UITextField {
134134
135135 func setupUI( ) {
136136 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+
143149 arrow = Arrow ( origin: CGPoint ( x: center. x - arrowSize / 2 , y: center. y - arrowSize / 2 ) , size: arrowSize)
144150 arrowContainerView. addSubview ( arrow)
145151
0 commit comments