Contents

pasteAndMatchStyle(_:)

Pastes the current contents of the pasteboard into your app’s interface using the text style of the target.

Declaration

optional func pasteAndMatchStyle(_ sender: Any?)

Parameters

  • sender:

    The object calling this method.

Discussion

UIKit calls this method when the user selects the Paste command from an editing menu. Your implementation should read the data from the pasteboard and add the resulting content to your interface using the target’s current text style.

See Also

Handling copy, cut, paste, and delete commands