Reputation: 31
I am working on an application that allows the user to add an image and move it around in a UITextView. The text flows around the image using exclusionPaths, but the words will break if there is not enough room on the remainder of the line instead of moving to the next line.
This is what I'm using to add the image and create the exclusionPaths for the text container
textView.addSubview(imageview)
let imagePath = UIBezierPath(rect: imageview.frame)
textView.textContainer.exclusionPaths = imagePath
This is what is happening, notice how the words will break up to the right of the image
Thank you for any help with this!
Upvotes: 2
Views: 1663
Reputation: 214
Can you create a rect using imageView.bounds and then give a try not sure but hoping for it to work
Upvotes: 0