Hello Smart People,
I am stumped.
• Multiple textViews with multiple textContainers laid out with NSLayoutManager. Works fine.
• Using RTFD with NSTextAttachments for images. Works fine.
I can enumerate through the textStorage, find the attachment attributes, get the bounds of the attachment and which textContainer it is in. I can create an exclusion path based on the bounds of the attachment and put it in the appropriate textContainer. I know the exclusion paths are working properly--if I put some arbitrary exclusion paths in the containers with no images, the text flows around them beautifully.
But, when I put the exclusion paths in when there are image attachments, it isn't working correctly. It seems that what is happening is the exclusion path is indeed there but the image is not inside the path. Since the attachment is a part of the attributed string, it is treated as just more text to flow around the path, which it does.
The big question:
How do I get the attachment to be inside the exclusion path and all the other text to be outside of the path?
macOS 10.14.4, XCode 10.2, Obj C, gallons of coffee, very little sleep.
800 views and still no cookie?