CFAttributedStringGetAttributeAndLongestEffectiveRange(_:_:_:_:_:)
Returns the value of a given attribute of an attributed string at a specified location.
Declaration
func CFAttributedStringGetAttributeAndLongestEffectiveRange(_ aStr: CFAttributedString!, _ loc: CFIndex, _ attrName: CFString!, _ inRange: CFRange, _ longestEffectiveRange: UnsafeMutablePointer<CFRange>!) -> CFTypeRef!Parameters
- aStr:
The attributed string to examine.
- loc:
The location in
strat which to determine the attributes. It is a programming error forlocto specify a location outside the bounds ofstr. - attrName:
The name of the attribute whose value you want to determine.
- inRange:
The range in
strwithin which you want to find the longest effective range of the attributes atloc.inRangemust not exceed the bounds ofstr. - longestEffectiveRange:
If not
NULL, upon return contains the maximal range withininRangeover which the exact same set of attributes apply. The returned range is clipped toinRange.
Return Value
A dictionary that contains the attributes of str at the specified location. Ownership follows the The Get Rule.