UIView *progress = [[UIView alloc] init];spa
progress.backgroundColor = [UIColor redColor];it
progress.frame = CGRectMake(20, 20, 300, 50);class
UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:progress.bounds byRoundingCorners:UIRectCornerBottomLeft|UIRectCornerTopLeft cornerRadii:CGSizeMake(25, 25)];margin
CAShapeLayer * maskLayer = [[CAShapeLayer alloc] init];di
maskLayer.frame = progress.bounds;view
maskLayer.path = maskPath.CGPath;vi
progress.layer.mask = maskLayer;co
[self.view addSubview:progress];background