Wrapping Text in a UITextView Around a UIImage WITHOUT CoreText

会有一股神秘感。 提交于 2019-11-27 03:24:04
Dannie P

This seems to do the trick:

UIBezierPath * imgRect = [UIBezierPath bezierPathWithRect:CGRectMake(0, 0, 100, 100)];
self.textView.textContainer.exclusionPaths = @[imgRect];

Works only from iOS 7 and up.

The short answer is you can't without CoreText pre iOS 7.

I've been struggling with this my self a while ago and the was very helpfull to me. http://robnapier.net/blog/wrapping-text-around-shape-with-coretext-540 It is CoreText though.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!