I have a string that is added to the UITextView, and I would like to add images after a certain world in that string.
Example:
@property (strong, nonatomic) IBOutlet UITextView *textview;
textview.text = @"This is an icon of a cat. And this is an
icon of a car. Here is more random text.";
This is an example of what I want:
How do I append and position images after a certain word?
I have an array that detects certain words:
NSArray *detectWords = @[@"cat", @"car"];
So I can detect when certain words show up in the text of a textview, but I'm not sure how to add an image right after those words.
Also, the string of words will vary in different situations (not static), so pre-positioning everything on the interface builder is not an option for me.
Thanks in advance!