2009-06-19 29 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); 
} 

從那裏,你只需要一個定時器設置動畫,改變矩形的大小,並添加更多的圈。