Package apple.uikit.protocol
Interface UITextPasteItem
-
- All Known Subinterfaces:
UISearchTextFieldPasteItem
public interface UITextPasteItemAPI-Since: 11.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull NSDictionary<java.lang.String,?>defaultAttributes()These will be the default attributes that will be applied to plain strings when they are provided.@NotNull NSItemProvideritemProvider()This is the NSItemProvider for the item being pasted or dropped.@Nullable java.lang.ObjectlocalObject()This is nil for normal pastes, but might be filled with the UIDragItem's localObject for pastes from drops.voidsetAttachmentResult(@NotNull NSTextAttachment textAttachment)provide an attachment result from this NSItemProvider's datavoidsetAttributedStringResult(@NotNull NSAttributedString string)provide an attributed representation result from this NSItemProvider's datavoidsetDefaultResult()Use this to indicate that want the default transformation to happen.voidsetNoResult()Use this to indicate that you don't want the data of this NSItemProvider included in the resulting string.voidsetStringResult(@NotNull java.lang.String string)provide a plain string representation result from this NSItemProvider's data
-
-
-
Method Detail
-
defaultAttributes
@NotNull @NotNull NSDictionary<java.lang.String,?> defaultAttributes()
These will be the default attributes that will be applied to plain strings when they are provided. You can use these to make your own attributed string if you want.
-
itemProvider
@NotNull @NotNull NSItemProvider itemProvider()
This is the NSItemProvider for the item being pasted or dropped. You should set a result for this item using one of the methods below.
-
localObject
@Nullable @Nullable java.lang.Object localObject()
This is nil for normal pastes, but might be filled with the UIDragItem's localObject for pastes from drops.
-
setAttachmentResult
void setAttachmentResult(@NotNull @NotNull NSTextAttachment textAttachment)provide an attachment result from this NSItemProvider's data
-
setAttributedStringResult
void setAttributedStringResult(@NotNull @NotNull NSAttributedString string)provide an attributed representation result from this NSItemProvider's data
-
setDefaultResult
void setDefaultResult()
Use this to indicate that want the default transformation to happen. If the item data for the item provider is not supported, this action will be the same as `setNoResult`. You can use this as a fallback for any items you are not handling yourself.
-
setNoResult
void setNoResult()
Use this to indicate that you don't want the data of this NSItemProvider included in the resulting string.
-
setStringResult
void setStringResult(@NotNull @NotNull java.lang.String string)provide a plain string representation result from this NSItemProvider's data
-
-