Looks like the line spacing of UITextView
changed in iOS 7 (presumably because the underlaying architect of the text view changed to TextKit
). My iOS project requires that the old pre-iOS 7 line spacing to be maintained.
To adjust the line spacing as needed, I found that the new NSLayoutManagerDelegate
can be used.
However, I am unable to figure out the logic of evaluating the line spacing to be used (based on font metrics) to mimic the pre-iOS 7 behavior of UITextView
. The logic needs to be generic as I need it to work for all fonts. Any help will be appreciated.