How can I set the background of a textView to a dark color and continue to see the text selection clearly?
I would like to set the colors for the textView to dark to avoid eye stress when working on the text.
If I set, for example, that the background of the background is black and the text is white, choosing the color of the text becomes a little difficult.
This is the code I am using:
mainTextField.backgroundColor = UIColor.black
mainTextField.textColor = UIColor.white
Is there a way to make te text selection more visible?
+3
source to share
2 answers
The highlight color of the selected UITextView text is determined by either the global or the view tint color.
You can set the color in the Storyboard by going to the file inspector and setting the global tint color, or in the UITextView's attribute inspector to apply it specifically for that view.
I also suggest you set the text color for the light text color.
+2
user7886734
source
to share