Returns the attributes of an attributed string at a specified location.
- iOS 2.0+
- macOS 10.4+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
- Core Foundation
The attributed string to examine.
The location in
strat which to determine the attributes.
locmust not exceed the bounds of
NULL, upon return contains a range including
locover which exactly the same set of attributes apply as at
A dictionary that contains the attributes of
str at the specified location. Ownership follows the The Get Rule.
For performance reasons, a range returned in
effective is not necessarily the maximal range. If you need the maximum range, you should use
Note that the returned attribute dictionary might change in unpredictable ways if the attributed string is edited after this call. If you want to preserve the state of the dictionary, you should make an actual copy of it rather than just retaining it. In addition, you should make no assumptions about the relationship of the actual dictionary returned by this call and the dictionary originally used to set the attributes, other than the fact that the values stored in the dictionaries will be identical (that is,
==) to those originally specified.