1
我想畫一些文字在我的CPView繪製文本,我有這樣的:如何卡布奇諾
- (void)drawRect:(CGRect)aRect{
var ctx = [[CPGraphicsContext currentContext] graphicsPort],
viewBounds = [self bounds];
CGContextTranslateCTM(ctx, 0, viewBounds.size.height);
CGContextScaleCTM(ctx, 1, -1);
CGContextSetLineWidth(ctx, 2.0);
CGContextShowTextAtPoint(ctx, 100.0, 100.0, "SOME TEXT", 9);
}
但是,我得到這個錯誤在控制檯:的ReferenceError:找不到變量:CGContextShowTextAtPoint
我應該怎麼做?