<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 2.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSAttributedString/init(adaptiveImageGlyph:attributes:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSAttributedString(cm)attributedStringWithAdaptiveImageGlyph:attributes:"
  },
  "title" : "init(adaptiveImageGlyph:attributes:)"
}
-->

# init(adaptiveImageGlyph:attributes:)

Creates an attributed string with an adaptive image glyph and applies the specified attributes to it.

```
convenience init(adaptiveImageGlyph: NSAdaptiveImageGlyph, attributes: [NSAttributedString.Key : Any] = [:])
```

## Parameters

`adaptiveImageGlyph`

The adaptive image glyph to place in the string. Typically, you get this type from the text input system.

`attributes`

The attributes to apply to the adaptive image glyph. Specify an empty dictionary to create the string without any extra attributes.

## Return Value

An attributed string containing the adaptive image glyph.

## Discussion

---

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)