For the bars itself use simple UIView instances.
After importing <QuartzCore/QuartzCore.h>
You can give them a border and a shadow via the layer (view.layer
).
See CALayer: https://developer.apple.com/library/ios/#documentation/graphicsimaging/reference/CALayer_class/Introduction/Introduction.html
borderWidth, borderColor, backgroundColor
shadowOpacity, shadowRadius, shadowOffset, shadowColor, shadowPath
For the animations of the numbers, use a timer and increase the numbers until the actual value is reached. Smth. like this:
CGFloat animationDuration = 1.0;
self.targetValue = 50;
[NSTimer scheduledTimerWithTimeInterval:animationDuration/targetValue target:self selector:@selector(increaseValue:) userInfo:nil repeats:YES];
and then a method like this:
- (void)increaseValue:(NSTimer*)timer;
{
self.label.text = [NSString stringWithFormat: @"%d", [self.label.text intValue]+1];
if ([self.label.text intValue] == self.targetValue) {
[timer invalidate];
}
}
For the animation, just resize the frames:
[UIView animateWithDuration:animationDuration animations:^{
CGRect rect = self.barView.frame;
rect.size.width = self.targetValue;
self.barView.frame = rect;
}];