Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selected Row Text Color #62

Open
AakifNadeem opened this issue Dec 30, 2019 · 5 comments
Open

Selected Row Text Color #62

AakifNadeem opened this issue Dec 30, 2019 · 5 comments

Comments

@AakifNadeem
Copy link

How to change text color of selected row ?

@awaismubeen
Copy link
Contributor

simply dropDownMenu.selectedRowColor = UIColor.green

@AakifNadeem
Copy link
Author

simply dropDownMenu.selectedRowColor = UIColor.green

That changes the row color not the text color.

@awaismubeen
Copy link
Contributor

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

@awaismubeen
Copy link
Contributor

awaismubeen commented Jan 7, 2020

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

@jriosdev
Copy link
Owner

Simply change
dropDownMenu.textColor = color

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants