Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

straber

macrumors member
Original poster
Jul 3, 2012
60
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 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 greatly appreciate any help with this.

Thanks in advance!
 
BezierPath

Use BezierPath!

Try:
Code:
UIBezierPath *exclusion = (pass image);
self.textView.textContainer.exclusionPaths = @[exclusion];
 
Last edited by a moderator:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.