Contents

delete(in:to:)

Deletes the specified amount of text.

Declaration

func delete(in direction: UITextStorageDirection, to granularity: UITextGranularity)

Parameters

  • direction:

    The direction in which to delete text, relative to the base writing direction.

  • granularity:

    The amount of text to delete.

Mentioned in

Discussion

The editing behavior-to-key combinations include:

Character backward

Delete

Character forward

Delete forward (Function + Delete)

Word backward

Option + Delete

Word forward

Option + Delete forward (Function + Delete)

Line end

Command + Delete

Line start

Command + Delete forward (Function + Delete)

Paragraph end

Control + K

Paragraph start

Control + Function + K