---
title: "register(_:forTextAttachmentViewProviderType:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstextview/register(_:fortextattachmentviewprovidertype:)"
---

# register(_:forTextAttachmentViewProviderType:)

Register the NSTextAttachmentViewProviderReusePolicy for all instances of a particular subclass of NSTextAttachmentViewProvider.

## Declaration

```swift
func register(_ policy: NSTextAttachmentViewProviderReusePolicy, forTextAttachmentViewProviderType viewProviderType: AnyClass)
```
