I have some lines that have been formatted with a CTFramesetterCreateFrame and the words are being printed the right way up, but the line order is reversed, i.e. the first line is at the bottom, the second line is second from the bottom and so on. I can change the transform and make the words back to front upside down etc, but I can’t get the line order correct
I’ve checked the transform matrix everywhere and its always the same –
CGAffineTransform a = CGContextGetTextMatrix (context);
gives me
a CGAffineTransform {...}
a CGFloat 1
b CGFloat 0
c CGFloat 0
d CGFloat -1
tx CGFloat 0
ty CGFloat 300
This is probably a noob mistake but I can’t find the problem, I’m fairly new to coretext so any advice would be appreciated.
OSX 10.7.4 running in IOS simulator IOS5.1 XCode 4.4 in a UIView
This seems to solve it – have a look here draw text right side up on ios
– always find the answer after posting the question
in brief you have to flip the co-ordinates back to how they are on osx with 0,0 in the bottom left, then it draws the right way up, you’d think it could be a bit better…