Authored by 阿达

fix bug

... ... @@ -91,9 +91,12 @@
- (void)setProgress:(float)progress animated:(BOOL)animated
{
BOOL isGrowing = progress > 0.f;
UIImageView * maskImageView =[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"Mask"]];
self.progressBarView.maskView = maskImageView;
UIImageView * maskImageView =[[UIImageView alloc]initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.progressBarView.frame), CGRectGetHeight(self.progressBarView.frame))];
CALayer *layer = [CALayer layer];
[layer setFrame:CGRectMake(0, 0, CGRectGetWidth(self.progressBarView.frame), CGRectGetHeight(self.progressBarView.frame))];
[layer setContents:(id)[UIImage imageNamed:@"Mask"].CGImage];
// self.progressBarView.maskView = maskImageView;
[self.progressBarView addSubview:maskImageView];
CGFloat originX = -CGRectGetWidth(self.bounds)/2;
CGPoint positionBegin = CGPointMake(originX+_progress * self.bounds.size.width, CGRectGetHeight(self.progressBarView.frame)/2);
... ...