If I add an image into a UITextView like this:
NSTextAttachment *textAttachment = [[NSTextAttachment alloc] init];
textAttachment.image = image;
NSAttributedString *attrStringWithImage = [NSAttributedString attributedStringWithAttachment:textAttachment];
[myString appendAttributedString:attrStringWithImage];
self.inputTextView.attributedText = myString;
How can I then later detect that the image has been deleted via the user hitting the back button on the keyboard?
Would I use the below?
- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text
If so, how?