Question

I've tried using setTintColor on my UIWebView instance, UIView appearance, and UIWebView appearance, but none of them are changing the caret color in a UIWebview.

This works fine with native textareas and whatnot, but not in the UIWebview. Has anyone been able to change the color of the UIWebView caret?

Thanks

Était-ce utile?

La solution

Setting the Tint color for UIWebview will not work for text highlighting. All you can do is set the background color of that text and then remove it by using javascript. Here's the Link having the Best solution to this problem.

Autres conseils

From the iOS 7 UI Transition Guide:

Setting the tintColor property by using the appearance proxy APIs is not supported in iOS 7.

Set the web view instance's tintColor directly (that is, not using the appearance API) and it should work.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top