Instance Property

color

Sets the color used for the drawing of a selection in both active and inactive states.

Declaration

iOS, Mac Catalyst
@NSCopying var color: UIColor? { get set }
macOS
@NSCopying var color: NSColor? { get set }

Discussion

When no color has been specified for the PDFSelection objects in a document, the selections are drawn using [NSColor selectedTextBackgroundColor] for the active state and [NSColor secondarySelectedControlColor] for the inactive state. Use the setColor method to supply a color you want to be used for the drawing of both active and inactive selections.

See Also

Getting Information About a Selection

var pages: [PDFPage]

Returns the array of pages contained in the selection.

var string: String?

Returns an NSString object representing the text contained in the selection (may contain linefeed characters).

var attributedString: NSAttributedString?

Returns an NSAttributedString object representing the text contained in the selection (may contain linefeed characters).

func bounds(for: PDFPage) -> CGRect

Returns the bounds of the selection on the specified page.

func selectionsByLine() -> [PDFSelection]

Returns an array of selections, one for each line of text covered by the receiver.