<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVMutableCaption/setDecoration(_:in:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "s:So16AVMutableCaptionC12AVFoundationE13setDecoration_2inySo09AVCaptionE0V_So8_NSRangeVtF"
  },
  "title" : "setDecoration(_:in:)"
}
-->

# setDecoration(_:in:)

Sets a decoration for a range of text.

```
@nonobjc func setDecoration(_ decoration: AVCaption.Decoration, in range: NSRange)
```

## Parameters

`decoration`

The decoration.

`range`

The range to which this decoration applies.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)