iOSDropDown icon indicating copy to clipboard operation
iOSDropDown copied to clipboard

Selected Row Text Color

Open AakifNadeem opened this issue 4 years ago • 5 comments

How to change text color of selected row ?

AakifNadeem avatar Dec 30 '19 13:12 AakifNadeem

simply dropDownMenu.selectedRowColor = UIColor.green

awaismubeen avatar Jan 07 '20 09:01 awaismubeen

simply dropDownMenu.selectedRowColor = UIColor.green

That changes the row color not the text color.

AakifNadeem avatar Jan 07 '20 12:01 AakifNadeem

it is show check mark against selected index still not changing the selected text color. in future it will be available

awaismubeen avatar Jan 07 '20 12:01 awaismubeen

for the time being you may user as go to iOSDropDown.swift file add these lines public var selectedTextColor: UIColor = UIColor(red: 2/255, green: 2/255, blue: 2/255, alpha: 1) var defaultTextColor = UIColor(red: 2/255, green: 2/255, blue: 2/255, alpha: 1) in cell for row at index path add the line cell?.textLabel?.textColor = (indexPath.row == selectedIndex) ? selectedTextColor : defaultTextColor clean the project and use dropDownMenu.selectedTextColor = UIColor.red it will work

awaismubeen avatar Jan 07 '20 13:01 awaismubeen

Simply change dropDownMenu.textColor = color

jriosdev avatar May 26 '22 11:05 jriosdev