iOSDropDown
iOSDropDown copied to clipboard
Selected Row Text Color
How to change text color of selected row ?
simply dropDownMenu.selectedRowColor = UIColor.green
simply
dropDownMenu.selectedRowColor = UIColor.green
That changes the row color not the text color.
it is show check mark against selected index still not changing the selected text color. in future it will be available
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
Simply change dropDownMenu.textColor = color