<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIConfigurationTextAttributesTransformer-c.typealias",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:@T@UIConfigurationTextAttributesTransformer"
  },
  "title" : "UIConfigurationTextAttributesTransformer"
}
-->

# UIConfigurationTextAttributesTransformer

Defines a text transformation that can affect the visual appearance of a string.

```
typedef NSDictionary<NSString *,id> *(^)(NSDictionary<NSString *,id> *) UIConfigurationTextAttributesTransformer;
```

## Discussion

Use a transformer to affect how your attributed text appears on the UI. You provide a closure when initializing the transformer. Your closure accepts a container with the current text attributes and returns a container with the new text attributes.

```objc
UIConfigurationTextAttributesTransformer transformer;
transformer = ^(NSDictionary<NSAttributedStringKey, id> *incoming) {
    NSMutableDictionary<NSAttributedStringKey, id> *outgoing = [incoming mutableCopy];
    outgoing[NSForegroundColorAttributeName] = [UIColor blackColor];
    outgoing[NSFontAttributeName] = [UIFont boldSystemFontOfSize:20];
    return outgoing;
};
```

---

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)