PSPDFTextSelectionMenuAction
Objective-C
enum PSPDFTextSelectionMenuAction : NSUInteger {}
Swift
struct TextSelectionMenuAction : OptionSet, @unchecked Sendable
Menu options when text is selected on this document.
-
No text selection actions.
Declaration
Objective-C
PSPDFTextSelectionMenuActionNone = 0
-
Allow search from selected text.
Declaration
Objective-C
PSPDFTextSelectionMenuActionSearch = 1 << 0
Swift
static var search: TextSelectionMenuAction { get }
-
Offers to show “Define” on selected text. Not available for Mac Catalyst (FB6823989 Offer UIReferenceLibraryViewController)
Declaration
Objective-C
PSPDFTextSelectionMenuActionDefine = 1 << 1
Swift
static var define: TextSelectionMenuAction { get }
-
Offers a toggle for Wikipedia.
Declaration
Objective-C
PSPDFTextSelectionMenuActionWikipedia = 1 << 2
Swift
static var wikipedia: TextSelectionMenuAction { get }
-
Allows text-to-speech. To avoid adding duplicate commands, this menu item is always omitted if the Speak Selection accessibility setting is enabled.
Declaration
Objective-C
PSPDFTextSelectionMenuActionSpeak = 1 << 3
Swift
static var speak: TextSelectionMenuAction { get }
-
Allows sharing content. Also used for image selection.
Declaration
Objective-C
PSPDFTextSelectionMenuActionShare = 1 << 4
Swift
static var share: TextSelectionMenuAction { get }
-
Allows copying the selected text.
Declaration
Objective-C
PSPDFTextSelectionMenuActionCopy = 1 << 5
Swift
static var copy: TextSelectionMenuAction { get }
-
Allows marking up the selected text (highlight/underline/strikeout).
Declaration
Objective-C
PSPDFTextSelectionMenuActionMarkup = 1 << 6
Swift
static var markup: TextSelectionMenuAction { get }
-
Allows redacting the selected text.
Declaration
Objective-C
PSPDFTextSelectionMenuActionRedact = 1 << 7
Swift
static var redact: TextSelectionMenuAction { get }
-
Allows creating a link from the selected text.
Declaration
Objective-C
PSPDFTextSelectionMenuActionCreateLink = 1 << 8
Swift
static var createLink: TextSelectionMenuAction { get }
-
Helper that encapsulates all text selection menu actions that create annotations: Text Highlight, Underline, Squiggle, Strikethrough, Redaction, Link. Removing this from
allowedMenuActions
does not have any effect on whether the annotation creation menu is shown when long pressing on an empty area of a page. To remove certain items from the annotation creation menu, useeditableAnnotationTypes
orcreateAnnotationMenuGroups
or disable that menu completely by settingisCreateAnnotationMenuEnabled
tofalse
.Declaration
Objective-C
PSPDFTextSelectionMenuActionAnnotationCreation = (PSPDFTextSelectionMenuActionMarkup | PSPDFTextSelectionMenuActionRedact | PSPDFTextSelectionMenuActionCreateLink)
Swift
static var annotationCreation: TextSelectionMenuAction { get }
-
All text selection entries
Declaration
Objective-C
PSPDFTextSelectionMenuActionAll = (9223372036854775807L * 2UL + 1UL)
Swift
static var all: TextSelectionMenuAction { get }