摘要: 参考了An iOS 4 iPhone Graphics Drawing Tutorial using Quartz 2D这篇文章,用了30分钟在iPhone上画出了一条直线,核心代码全在drawRect这个方法中:- (void)drawRect:(CGRect)rect { CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSetLineWidth(context, 2.0); CGFloat componets[] = {0.0, 0.0, 1.0, 1.0}; CGColorSpaceRe... 阅读全文
posted @ 2011-05-27 08:57 申龙斌的程序人生 阅读(2201) 评论(0) 推荐(1) 编辑