Reputation: 3092
I would like to set the colors for a textView to dark to avoid to stress the eyes when working on text.
If I set for example the field background to be black and the text to be white, the text color selection becomes a bit hard to see.
This is the code I'm using:
mainTextField.backgroundColor = UIColor.black
mainTextField.textColor = UIColor.white
Is there a way to have te selection of the text more visible?
Upvotes: 4
Views: 3240
Reputation:
UITextView text selection highlight color is determined by either the global or the view tint color.
You can set the color in Storyboard, by going to file inspector and setting the global tint color, or in attributes inspector of UITextView to apply it specifically for that view.
I also suggest that you set text color to Light Text Color.
Upvotes: 2
Reputation: 18561
I believe the text selection color is managed by the tintColor. You could set it to whatever you like by setting mainTextField.tintColor = UIColor.orange
Upvotes: 2