阅读背景:

drawRect:rect如何调用此方法,我用来绘制一个字符串

来源:互联网 
-(void)drawRect:(CGRect)rect
{   
    CGContextRef  context = UIGraphicsGetCurrentContext();
    CGContextSelectFont(context, "Arial", 24, kCGEncodingFontSpecific);
    CGContextSetTextPosition(context,80,80);
    CGContextShowText(context, "hello", 6);
    //not even this works
    CGContextShowTextAtPoint(context, 1,1, "hello", 6);
}
-(void)drawRect:(CGRect)rect
{   
    CGContext



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: