小编use*_*007的帖子

使用CGContextShowAtPoint时,为什么我的文字会翻转?

我正在写一个简单的练习.但是,当我尝试使用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的帮助.

iphone objective-c

6
推荐指数
2
解决办法
1589
查看次数

标签 统计

iphone ×1

objective-c ×1