Instance Property


The attributes to apply to new text being entered by the user.


var typingAttributes: [NSAttributedString.Key : Any] { get set }


This dictionary contains the attribute keys (and corresponding values) to apply to newly typed text. When the text view’s selection changes, the contents of the dictionary are cleared automatically.

See Also

Configuring the Text Attributes

var text: String!

The text displayed by the text view.

var attributedText: NSAttributedString!

The styled text displayed by the text view.

var font: UIFont?

The font of the text.

var textColor: UIColor?

The color of the text.

var isEditable: Bool

A Boolean value indicating whether the receiver is editable.

var allowsEditingTextAttributes: Bool

A Boolean value indicating whether the text view allows the user to edit style information.

var dataDetectorTypes: UIDataDetectorTypes

The types of data converted to tappable URLs in the text view.

var textAlignment: NSTextAlignment

The technique to use for aligning the text.

var textContainerInset: UIEdgeInsets

The inset of the text container's layout area within the text view's content area.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software