I am trying to add wrapping to a drawing string using Core Text. So far, I have found an extension of this category in NSString that tries to add hyphens, but it is deprecated and does not work when the line has apostrophes, as well as many other questions. And then this other guy uses this code for this, but it depends on the first source code, which is not good.
But now in iOS 5, apparently, the built-in transfer method is portable, although the tutorials and examples are extremely scarce: CFStringGetHyphenationLocationBeforeIndex
. Can someone more experienced with Core Text and CF prepare a quick example of how I can potentially use this feature?
source share