i want to obtain the progress bar like in the image below:
Striped loading progress bar with triangle at the end
Here is what i've done so far, with the help of the project from github https://github.com/iluuu1994/ITProgressBar-iOS, so here is what i attempted:
UIGraphicsBeginImageContextWithOptions(CGSizeMake(42, self.frame.size.height-10), NO, 0.f);
UIColor* color = [UIColor colorWithRed:251.0f/255.0f green:235.0f/255.0f blue:77.0f/255.0f alpha:1.0f];
UIBezierPath *bezierPath = [UIBezierPath new];
[bezierPath moveToPoint:CGPointMake(0.0, 0.0)];
[bezierPath addLineToPoint:CGPointMake(23, 0)];
[bezierPath addLineToPoint:CGPointMake(42, 29)];
[bezierPath addLineToPoint:CGPointMake(23, 70)];
[bezierPath addLineToPoint:CGPointMake(0, 70)];
[bezierPath addLineToPoint:CGPointMake(20, 29)];
[bezierPath addLineToPoint:CGPointMake(0, 0)];
[bezierPath closePath];
[color setFill];
[bezierPath fill];
}];
}
I tried to override the drawRect method from UIView but nothing seems to work, so i fought to apply a mask to the layer I'am using.