I don't understand
You said : i need to attach a label
when you say label, that's not a UILabel ? Is that simply a string ?
Attach to what ?
Attaching a UILabel inside an attributedString does not make sense.
What you can do is compute an image of a label with a circle, set its backgroundColor programmatically and include in AttributedString as explained before through attachement.
But I understand you don't want that.
So, do you want to attach to the UILabel where the attributedString is displayed ?
Let's try to draw it
___ _________________________
| 1 | | attributedString |
|___| |________________________|
UILabel UILabel
1 is the label, with a background color.
Is it what you want ?
If not, please try to draw what you want