---
title: attributedText
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uitextview/attributedtext
---

# attributedText

The styled text that the text view displays.

## Declaration

```swift
@NSCopying var attributedText: NSAttributedString! { get set }
```

## Discussion

Discussion Assigning a new value to this property also replaces the value of the text property with the same string data, albeit without any formatting information. In addition, the font, textColor, and textAlignment properties are updated to reflect the typing attributes of the text view.

## See Also

### Specifying the text content

- [text](uikit/uitextview/text.md)
