0

I'm trying to subclass UIView to build a control that will use CoreText to draw text around some images, where the location of the images will be determined by tags in the text I'm drawing.

For example, I'd get a string like this:

     "Here is some text <img src="img1.png" width="20" height="20"> and here is the rest of the text."

Basically, I want to replace everything between the <> with the 20x20 image it references, and draw all the text before the tag in front of it and all the text after the tag after the image.

I would really appreciate any help with this. Thanks!

Rafał Sroka
  • 39,540
  • 23
  • 113
  • 143
SeanT
  • 1,741
  • 1
  • 16
  • 24
  • 1
    [possible duplicate](http://stackoverflow.com/questions/5284516/how-can-i-draw-image-with-text-wrapping-on-ios) – Emmanuel Feb 20 '14 at 18:53
  • That post helped a little bit, but he just hardcoded a rect for the text to flow around and I need to do it dynamically by finding tags in the string and that's the part I can't figure out. – SeanT Feb 20 '14 at 19:02

0 Answers0