Skip to content

Commit 1ffcfd3

Browse files
authored
Merge pull request #102 from mbrufatto/feature/change-color-item-text-and-change-checkmark-color
Added parameters that possible change colors
2 parents 22ff2a5 + 0f5f8f9 commit 1ffcfd3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

iOSDropDown/Classes/iOSDropDown.swift

+4
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ open class DropDown : UITextField{
2020

2121
@IBInspectable public var rowHeight: CGFloat = 30
2222
@IBInspectable public var rowBackgroundColor: UIColor = .white
23+
@IBInspectable public var itemsColor: UIColor = .gray
24+
@IBInspectable public var itemsTintColor: UIColor = .blue
2325
@IBInspectable public var selectedRowColor: UIColor = .cyan
2426
@IBInspectable public var hideOptionsWhenSelect = true
2527
@IBInspectable public var isSearchEnable: Bool = true {
@@ -397,6 +399,8 @@ extension DropDown: UITableViewDataSource {
397399
cell!.imageView!.image = UIImage(named: imageArray[indexPath.row])
398400
}
399401
cell!.textLabel!.text = "\(dataArray[indexPath.row])"
402+
cell!.textLabel!.textColor = itemsColor
403+
cell!.tintColor = itemsTintColor
400404
cell!.accessoryType = (indexPath.row == selectedIndex) && checkMarkEnabled ? .checkmark : .none
401405
cell!.selectionStyle = .none
402406
cell?.textLabel?.font = self.font

0 commit comments

Comments
 (0)