NSString *strFromInt = [NSString stringWithFormat:@"%d",score];
NSString *strFromInt2 = [NSString stringWithFormat:@"%ld",(long)highscore];
CGContextRef gc = UIGraphicsGetCurrentContext();
CGContextSetRGBFillColor(gc, 0, 0, 0, 1);
UIFont *uif = [UIFont systemFontOfSize:32];
NSString *combind = [NSString stringWithFormat:@"%@%@%@%@", str, strFromInt, str2, strFromInt2];
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSaveGState(context);
CGContextRotateCTM(context, -(M_PI/2));
CGContextRestoreGState(context);
[combind drawAtPoint:CGPointMake(100, 100) withAttributes:@{NSFontAttributeName:uif}];
我的代码适用于打印高分,但我当前的应用程序是横向而不是纵向,因此文本以90度角显示。有没有办法解决这个问题(没有切换到标签,因为需要进行大量更改)?