One Logo Pool Ball
SwiftUICore · IOS API REFERENCE

TextRenderer

protocol · iOS 17.0+ · SDK 27.1

protocol TextRenderer : Animatable

A value that can replace the default text view rendering behavior.

Members (2)

method · iOS 18.0+

sizeThatFits

Swift declaration
@export(implementation) func sizeThatFits(proposal: ProposedViewSize, text: TextProxy) -> CGSize

Returns the size of the text in `proposal`. The provided `text` proxy value may be used to query the sizing behavior of the underlying text layout. The default implementation of this function returns `text.size(proposal)`.

get · iOS 18.0+

displayPadding

Swift declaration
@export(implementation) var displayPadding: EdgeInsets { get }

Returns the size of the extra padding added to any drawing layer used to rasterize the text. For example when drawing the text with a shadow this may be used to extend the drawing bounds to avoid clipping the shadow. The default implementation of this function returns an empty set of insets.

Skipped declarations

No declarations were skipped in this snapshot.

All SwiftUICore types →