Setting NSTextAttachment bounds doesn't work on iOS 15

243 Views Asked by At
    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

There are 0 best solutions below