One Logo Pool Ball
Foundation · IOS API REFERENCE

AttributeDynamicLookup

enum · iOS 15.0+ · SDK 27.1

@dynamicMemberLookup @frozen enum AttributeDynamicLookup

A type to support dynamic member lookup of attributes and containers. This type allows attribute owners to add extensions that enable dynamic member lookup access to attributes. Supporting types — including ``AttributedString``, ``AttributedSubstring``, and ``AttributeContainer`` — gain dynamic lookup support by extending this type. You can enable dynamic member lookup for your own ``AttributedStringKey`` attributes by defining them as implementations, collecting them into an ``AttributeScope`` and extending ``AttributeDynamicLookup``, like in the following example: ```swift public extension AttributeDynamicLookup { subscript<T: AttributedStringKey>(dynamicMember keyPath: KeyPath<AttributeScopes.MyFrameworkAttributes, T>) -> T { return self[T.self] } } ```

Members (0)

This type has no directly callable members in this snapshot. See the framework’s skipped declarations for unsupported APIs.

Skipped declarations

4 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

AttributeDynamicLookup.subscript(_:)

Passing a Swift type itself is not supported.

AttributeDynamicLookup.subscript(dynamicMember:)

This declaration needs Swift generic type arguments. (no canonical witness for T)

AttributeDynamicLookup.subscript(dynamicMember:)

This declaration needs Swift generic type arguments. (no canonical witness for T)

AttributeDynamicLookup.subscript(dynamicMember:)

This declaration needs Swift generic type arguments. (no canonical witness for T)

All Foundation types →