From 4b29f00577e7107b74b3b96ca2f28d85b4d851b0 Mon Sep 17 00:00:00 2001 From: Mohammad Ali Panhwar <29018426+Mohammadalipanhwar11@users.noreply.github.com> Date: Sat, 17 May 2025 20:07:51 +0500 Subject: [PATCH] added new item "selectedRowTextColor" --- iOSDropDown/Classes/iOSDropDown.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/iOSDropDown/Classes/iOSDropDown.swift b/iOSDropDown/Classes/iOSDropDown.swift index 126ef3b..81faa3d 100644 --- a/iOSDropDown/Classes/iOSDropDown.swift +++ b/iOSDropDown/Classes/iOSDropDown.swift @@ -21,6 +21,7 @@ open class DropDown: UITextField { @IBInspectable public var itemsColor: UIColor = .darkGray @IBInspectable public var itemsTintColor: UIColor = .blue @IBInspectable public var selectedRowColor: UIColor = .systemPink + @IBInspectable public var selectedRowTextColor: UIColor = .black @IBInspectable public var hideOptionsWhenSelect = true @IBInspectable public var isSearchEnable: Bool = true { didSet { @@ -404,15 +405,16 @@ extension DropDown: UITableViewDataSource { if indexPath.row != selectedIndex { cell!.backgroundColor = rowBackgroundColor + cell!.textLabel!.textColor = itemsColor } else { cell?.backgroundColor = selectedRowColor + cell!.textLabel!.textColor = selectedRowTextColor } if imageArray.count > indexPath.row { cell!.imageView!.image = UIImage(named: imageArray[indexPath.row]) } cell!.textLabel!.text = "\(dataArray[indexPath.row])" - cell!.textLabel!.textColor = itemsColor cell!.tintColor = itemsTintColor cell!.accessoryType = (indexPath.row == selectedIndex) && checkMarkEnabled ? .checkmark : .none cell!.selectionStyle = .none