var accessibilityDragSourceDescriptors : [UIAccessibilityLocationDescriptor]?
var accessibilityDropPointDescriptors : [UIAccessibilityLocationDescriptor]?
Technology
By default, if an accessible view or its subtree has drag and/or drop interactions, they will be automatically exposed by assistive technologies. However, if there is more than one such interaction, each drag or drop should have a name to disambiguate it and give a good user experience. Also, there may be situations in which you want to expose drags or drops from an element, and those interactions are installed on views that are not part of that element's view hierarchy subtree.
This is trivially the case when the element is not a view at all, but an instance of UIAccessibility
.
Another example is when a container view maintains interactions that are logically associated with subviews.
For instance, UITable
has associated drag interactions that allow for dragging its rows; to make the rows draggable by assistive technologies, UITable
has drag descriptors that describe where in the table view to start a drag to activate dragging of the cell.
Note 注意
This implementation detail is noted here for expository purposes only and may change at any time without warning.
Properties defined here allow you to fine-tune how drags and drops are exposed to assistive technologies. Both of their getter methods can be overridden to provide information on-demand.
For each location descriptor, the associated view should be the UIView
with the appropriate UIInteraction
object for that drag or drop.
var accessibilityDragSourceDescriptors : [UIAccessibilityLocationDescriptor]?
var accessibilityDropPointDescriptors : [UIAccessibilityLocationDescriptor]?