In my app I have a UITextView
and a button just below the text view to insert a photo into the UITextView
while editing.
My requirement is
If you add it only as a subview, some text can be "behind" the image. So add the code which will "tell" the text, that area of the image is inaccessible:
UIBezierPath *exclusionPath = [UIBezierPath bezierPathWithRect:CGRectMake(CGRectGetMinX(imageView.frame),
CGRectGetMinY(imageView.frame), CGRectGetWidth(imageView.frame),
CGRectGetHeight(imageView.frame))];
textView.textContainer.exclusionPaths = @[exclusionPath];