我是iPhone新手,并且无法弄清楚如何使用Core Graphics。我用来测试的代码是:如何在iPhone上使用Core Graphics绘制视图
- (void)drawRect:(CGRect)rect{
CGContextRef ctx = UIGraphicsGetCurrentContext();
CGContextClearRect(ctx, rect);
CGContextSetRGBStrokeColor(ctx, 255, 255, 0, 1);
CGContextStrokeRect(ctx, CGRectMake(195, 195, 60, 60)); }
我把它放在ViewController.m文件在默认视图基于应用程序,但在应用程序运行时没有任何反应。
你想要什么来实现呢? – Jhaliya 2011-05-27 19:27:18