質問

I am developing an app in which there is a requirement in which there is a text in text view. I have to give mirror effect to that text view text. I am searching on Google but can't find any solution.

How can I solve it? Thanks in advance.

役に立ちましたか?

解決

I wrote a blog post awhile ago that uses a view's CAReplicatorLayer. It's designed for handling dynamics updates to a view with reflection. The post uses a UIWebView, but you could just use a UITextView instead.

他のヒント

Add a UILabel right beneath the text field. Apply a scale transformation to mirror it. Scale the y axis by -1 and the x axis by 1. Then all you have to do is update the text in the label every time the text field changes.

Check out this Demo project. It has what you want.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top