Contents

insertTextPlaceholder(size:completionHandler:)

Inserts a placeholder object to reserve visual space during text input.

Declaration

func insertTextPlaceholder(size: CGSize, completionHandler: @escaping  @Sendable (UITextPlaceholder) -> Void)
func insertTextPlaceholder(size: CGSize) async -> UITextPlaceholder

Discussion

If size.height is less than or equal to zero, then the placeholder is inline and line height. If size.height is greater than zero, then the placeholder is a paragraph of height size.height.