我正在写一个简单的练习.但是,当我尝试使用CGContext在UIView上放置一些字符串时,我的文字翻转过来,我想知道为什么以及如何将其更改为正确的格式.
这是我在drawRect中的代码
char *string = "TEST";
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextBeginPath(context);
CGContextSelectFont (context,"Helvetica-Bold",12, kCGEncodingMacRoman);
CGContextShowTextAtPoint(context, 5, 5, string, strlen(string));
CGContextClosePath(context);
Run Code Online (Sandbox Code Playgroud)
Thanx的帮助.