1

How I can change caret color in textView for Catalyst version of my app? I tried to use

textView.tintColor

but it doesn't works on Catalyst.

I mean

enter image description here

Lin Du
  • 88,126
  • 95
  • 281
  • 483
Parcker
  • 219
  • 1
  • 10
  • There is a working answer here: https://stackoverflow.com/questions/60537039/change-prompt-color-for-uitextfield-or-uitextview-on-mac-catalyst – CristianMoisei Nov 13 '22 at 09:14

1 Answers1

0

Try this: [[textView textInputTraits] setValue:[UIColor redColor] forKey:@"insertionPointColor"];

Sourced from here, but it may be private: https://stackoverflow.com/a/4273440/1043615

One comment says it no longer works from iOS 10 but it works OK for Catalyst.

K1w1Geek
  • 605
  • 5
  • 5