- (void)initCornerView:(UIView *)cornerView byRoundingCorners:(UIRectCorner)corners
{
UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:cornerView.bounds byRoundingCorners:corners cornerRadii:CGSizeMake(5, 5)];
CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
maskLayer.frame = cornerView.bounds;
maskLayer.path = maskPath.CGPath;
cornerView.layer.mask = maskLayer;
[maskLayer release];
}