UIPasteboard

class UIPasteboard : NSObject

This extesion adds some useful functions to UIPasteboard.

  • Copy a text to the pasteboard.

    Declaration

    Swift

    public static func copy(text: String)

    Parameters

    text

    The text to be copy to.

  • Returns the last copied string from pasteboard.

    Declaration

    Swift

    public static func getString() -> String

    Return Value

    Returns the last copied string from pasteboard.