Ok, i think the best way is using the CoreGraphics!
Here's the code i wrote, maybe can be useful to somebody...
- (void)drawRect:(CGRect)rect {
// Get the graphics context
CGContextRef ctx = UIGraphicsGetCurrentContext();
int max = arc4random()%5+5;
int unit = floor(155/max);
int h;
for (int i=0; i<24; i++) {
int numero = arc4random()%max;
if (numero != 0) {
h = (max-numero)*unit;
// Draw the bars
CGContextSetRGBFillColor(ctx, 130, 0, 180, 1);
CGContextFillRect(ctx, CGRectMake(4+i*25.6, 9+h, 19, 155-h));
CGContextFillEllipseInRect(ctx, CGRectMake(4+i*25.6, 2+h, 19, 14));
// Draw the number
NSString *newString = [[NSString alloc]initWithFormat:@"%d",numero];
CGContextSetRGBFillColor(ctx, 255, 255, 255, 0.7);
CGPoint newPoint = {8+i*25.6, 2+h};
UIFont *font = [UIFont systemFontOfSize:20];
[newString drawAtPoint:newPoint withFont:font];
}
}
}