I use a UIView for NSTextAttachmentViewProvider to render the attachment and then use the UIDragItem.previewProvider to return a UIDragPreview with the UIView.
This works but the delegate which returns the UIDragPreview is only called after the initial drag image is shown.
If you use an image for NSTextAttachment then you get the correct initial drag image but for the view from NSTextAttachmentViewProvider it always uses this ugly default image which I need to remove.
Does anyone know how to do this? I found no example code on how NSTextAttachmentViewProvider and drag and drop is supposed to work so I can't say how this is supposed to work or if it's a TextKit 2 bug etc...
Thanks!