Does anyone know how get the NSTextAttachment
image's position centre in UITextView
?
I'm working on an app that allow user to input text and image in a UITextView
, and when user click on an image, it will show the image viewer for all images. This is easy, and I have get this done.
Now, I need to create a custom transition from UITextView
(in a UIViewController
) to the image viewer, I'm struggling to find each image's centre in the UITextView
so I can create a snapshot for the custom transitioning.
The custom transitioning is basically the same as iOS "Note" app, when tap on an image, then create an snapshot, move it the right position.
I appreciate any help or idea to solve this problem.