How can I obtain the attributes of an NSAttributedString?
I thought using enumerateAttributesInRange:NSMakeRange(0, str.length)
and then saving every attributes in a NSMutableDictionaries but I'd like to know if exists a better way.
EDIT------
My problem is that I have a NSAttributedString
and i want to use this function on its attributes...
CTFramesetterSuggestFrameSizeWithConstraints(framesetter,range, __ATTRIBUTES__, size , NULL);
NSDictionary *attributesFromString = [string attributesAtIndex:0 longestEffectiveRange:nil inRange:NSMakeRange(0, string.length)];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With