UITextView attributedText is ignored requiring custom drag (suggestion: UITextDragOptions)

Originator:felipekellermann
Number:rdar://34098227 Date Originated:August 26 2017, 2:14 PM
Status:Open Resolved:
Product:iOS + SDK Product Version:iOS 11 beta 7 (15A5362a)
Classification:UI/Usability Reproducible:Always
 
Area:
UIKit

Summary:
UITextView provides an excellent drag & drop experience by default through UITextDraggable. The attributedText is being ignored, even though the drag preview shows the formatted text correctly, thus requiring a custom implementation. As most developers will simply use standard behavior, this results in a bad customer experience and even customer support. Perhaps supporting a UITextDragOptions to *strip* formatting (attributedText as simple text) would be great.

Steps to Reproduce:
1 - Create any UITextView instance.
2 - Configure a formatted text using attributedText.
3 - Use the standard iOS 11 drag interactions.
4 - Observe that the drag preview shows the formatting.
5 - Drop the content in any rich text canvas (Notes, Mail, etc.).

Expected Results:
When UITextView contains attributedText and user is selecting/dragging formatted text it should drag the formatted content.

Observed Results:
The attributedText selected and dragged shows correctly the formatted preview but drag simple unformatted text.

Version:
iOS 11 beta 7 (15A5362a)

Notes:


Configuration:

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!