Function

CFAttributedStringSetAttribute

Sets the value of a single attribute over the specified range.

Declaration

void CFAttributedStringSetAttribute(CFMutableAttributedStringRef aStr, CFRange range, CFStringRef attrName, CFTypeRef value);

Parameters

aStr

The mutable attributed string to modify.

range

The range of aStr over to which the new attributes apply. range must not exceed the bounds of aStr.

attrName

The name of the attribute whose value to set.

value

The value of the attribute attrName to apply over range. This value may not be NULL. If you want to remove an attribute, use CFAttributedStringRemoveAttribute.

See Also

Modifying a CFMutableAttributedString

CFAttributedStringBeginEditing

Defers internal consistency-checking and coalescing for a mutable attributed string.

CFAttributedStringEndEditing

Re-enables internal consistency-checking and coalescing for a mutable attributed string.

CFAttributedStringGetMutableString

Gets as a mutable string the string for an attributed string.

CFAttributedStringRemoveAttribute

Removes the value of a single attribute over a specified range.

CFAttributedStringReplaceString

Modifies the string of an attributed string.

CFAttributedStringReplaceAttributedString

Replaces the attributed substring over a range with another attributed string.

CFAttributedStringSetAttributes

Sets the value of attributes of a mutable attributed string over a specified range.