Rightpoint / BonMot

Beautiful, easy attributed strings in Swift
MIT License
3.54k stars 197 forks source link

Handling ranges #299

Closed ekimia closed 7 years ago

ekimia commented 7 years ago

Curious what your thoughts are @ZevEisenberg on handling different styles in a string given I don't see a reference to a Range object in your code. Lets take this for example:

This part is red. This part is blue.
ZevEisenberg commented 7 years ago

@ekimia the recommended way to handle that in BonMot is to use XML (see the XML section of the ReadMe for more information). Do you have a use case that wouldn't be handled well by XML?

ekimia commented 7 years ago

Ah great!. When I get some time ill play with adding a + operator for NSAttributedString to accomplish the same