问题描述:

How can I draw a bar gauge like this image?

网友答案:
   for(int i=1;i<30;i++)
{
    imgview=[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"imagename.png"]];
    imgview.frame=CGRectMake(10+i*10, 10, 10, 20);
    imgview.tag=i;
    [self.view addSubview:imgview]; 
}
   do this loop with some animation 
网友答案:

I suggest Animating a UIImageView with NSArray on a timer. If you are not interested in using UIImageView and want this strictly programming, you could do a drawRect and create square that are displayed according to the timer and NSArray data.

Its harder to get help when you don't explain your own effort.

网友答案:

You can make a custom progress bar with custom progress image and trace image as and white colored image for progress and then put an UIImageView with image like this above the progressview then the white color image will progress below this image and it look likes just like the progress that you want..
The bared images is png and I have cut it not in a good way but you can make it better.

相关阅读:
Top