FROM : I. Savant
DATE : Wed Nov 07 22:53:56 2007
> I am currently combining several strings into one string using
> -stringByAppendingString- and then converting this string into
> AttributedString for output -
>
> but each String has a distinct colour (user defined) which the
> NSAttributedString object does not recognize - it just colours the whole
> concatenated string the same colour based on the value it grabs from
> NSDictionary
-stringByAppendingString: returns an NSString. How do you think your
attributed string's attribute runs would be affected by this?
> What is the best way to output a concatenated, multicolored string ?
The best way? Dunno for sure, but the easy way: Create an
NSMutableAttributedString and use -appendAttributedString: ...
--
I.S.
DATE : Wed Nov 07 22:53:56 2007
> I am currently combining several strings into one string using
> -stringByAppendingString- and then converting this string into
> AttributedString for output -
>
> but each String has a distinct colour (user defined) which the
> NSAttributedString object does not recognize - it just colours the whole
> concatenated string the same colour based on the value it grabs from
> NSDictionary
-stringByAppendingString: returns an NSString. How do you think your
attributed string's attribute runs would be affected by this?
> What is the best way to output a concatenated, multicolored string ?
The best way? Dunno for sure, but the easy way: Create an
NSMutableAttributedString and use -appendAttributedString: ...
--
I.S.
| Related mails | Author | Date |
|---|---|---|
| Erfan Aleemullah | Nov 7, 22:37 | |
| Shawn Erickson | Nov 7, 22:52 | |
| I. Savant | Nov 7, 22:53 | |
| Shawn Erickson | Nov 7, 22:55 |






Cocoa mail archive

