Setting NSTextAttachment bounds doesn't work on iOS 15

Viewed 136
    let attachment = NSTextAttachment()
    attachment.image = UIImage(named: "icon")
    attachment.bounds = CGRect(x: 8, y: 0, width: 12, height: 12)

The above code works well on mobile phones under iOS15, but the interval between text and image is always zero on iOS15

the bounds not work!

0 Answers
Related