2009-06-19 42 views

回答

1

要绘制静态圈在UIView子类:

- (void)drawRect:(CGRect)rect 
{ 
    CGRect rect = { 0.0f, 0.0f, 100.0f, 100.0f }; 
    CGContextRef context = UIGraphicsGetCurrentContext(); 
    CGContextSetRGBStrokeColor(context, 1.0, 0.0, 0.0, 1.0); 
    CGContextSetLineWidth(context, 2.0f); 
    CGContextAddEllipseInRect(context, rect); 
    CGContextStrokePath(context); 
} 

从那里,你只需要一个定时器设置动画,改变矩形的大小,并添加更多的圈。