iPhone: UITextView wrap around UIImage?

后端 未结 3 1337
时光说笑
时光说笑 2020-12-19 05:31

How do I get a UITextView to wrap its text around a UIImage like in this image? \"alt

The image size is

3条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-19 06:20

    Gil's answer in Swift:

    let exclusionPath = UIBezierPath(rect: CGRectMake(0, 0, 100, 100))
    self.textView.textContainer.exclusionPaths = [exclusionPath]
    

提交回复
热议问题