问题
How do I wrap text around an image in a tableview. Below is a sample of a tableview with image and text, I would like to have the text wrap to the side and below the image.
回答1:
Use UITextView for this,
cell.layoutIfNeeded()
let imageFrame = UIBezierPath(rect: cell.imageView.frame)
cell.textView.textContainer.exclusionPaths = [imageFrame]
来源:https://stackoverflow.com/questions/44332928/xcode-swift-how-to-wrap-text-around-image