I'm using a UITextView and want to change the angle of the text fragments as described in the drawing below.
The current result shows my actual way:
frameText.layer.transform = CATransform3DMakeRotation(DEGREES_TO_RADIANS(angle), 0, 0, 1);
As described by Ray Wenderlich in his Text Kit tutorial a TextView is separeated into several classes:
I know, it is possible to define size and position of a text fragement in a custom NSTextContainer
e.g. using the
(CGRect)lineFragmentRectForProposedRect:(CGRect)proposedRect atIndex:(NSUInteger)characterIndex writingDirection:(NSWritingDirection)baseWritingDirection remainingRect:(CGRect *)remainingRect {...}
method.
But I can't find a way to rotate the text fragments directly. Does anyone have an idea how to achieve this?