Has anyone gotten multi-touch zoom to work on a textView?
I have searched SO and found no simple way to zoom in on a UITextView or UIScrollView. I was led to this link which says I need to write custom views to overwrite the existing ones in order to be able to zoom in to a textView. I can not believe this and would like someone to please let me know if there is a simple way to zoom in and zoom out using multi-touch on a UITextView or a UIScrollView.
I tried setting the options in the IB to enable multi-touch as well as the max zoom. But this does not work.
Please advise. Thank you.
1 Create a new project with single view (using storyboard & arc)
2 Open Storyboard and add a
UIScrollViewto your main view controller3 Set the UIScrollView’s delegate to the view controller and create an IBOutlet for the UIScrollView called
scrollview4 Add a UITextView to the scrollview and set an IBOutlet called
textview5 At the end of the ViewDidLoad add the following code:
6 Add the following method
7 Run the project and zoom away!
If you want the text to look not render blurry when use the answer at this Blurry UITextField Question