I am trying to implement editable Snapchat text in an image. What I have done so far is to implement UILabel in the center of UIImageView, and I have added 3 gestures to this UILabel: UIPanGestureRecognizer, UIPinchGestureRecognizer and UIRotationGestureRecognizer.
I managed to implement the pan method, but itβs not easy for me to make Pinch + Rotation the same way they do, I get terrible T_T results
What do you guys think this was done? which components are involved in this, and if you have reading / viewing material that I could use for this.
Thanks:)
EDIT:
These are the methods I used to handle Pinch and Rotation:
func handlePinch(recognizer: UIPinchGestureRecognizer) { if let view = recognizer.view as? UILabel { view.transform = CGAffineTransformScale(view.transform, recognizer.scale, recognizer.scale) } } func handleRotate(recognizer: UIRotationGestureRecognizer) { if let view = recognizer.view as? UILabel { view.transform = CGAffineTransformRotate(view.transform, recognizer.rotation) } }
Preview of how the pinch that I performed works: https://drive.google.com/file/d/0B-AVM51jxsvUY2RUUHdWbGo5QlU/view?usp=sharing

source share