The task is: how to calculate the frame substring (there is an NSRange) for a UILabel when the text is centered - NSTextAlignmentCenter?
ie, the origin position is x, y and the size is wight, height.
Everything works well when we use TextKit classes (NSTextStorage, NSLayoutManager, NSTextContainer) using the method: boundingRectForGlyphRange:inTextContainer: but with center alignment does not work.
Is there an elegant solution for UILabel? or if not, how to calculate the same in a UITextView?
Thank.