---
title: containsAttachments
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/nsattributedstring/containsattachments
---

# containsAttachments

A Boolean value that indicates whether the attribute string contains any attachment attributes.

## Declaration

```swift
var containsAttachments: Bool { get }
```

## Return Value

Return Value YES if the attributed string contains any attachment attributes, otherwise NO.

## Discussion

Discussion This method checks only for attachment attributes, not for NSAttachmentCharacter.
