-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upload arrow #5
Comments
I had a similar need and just added this method: - (void) drawArrowUp {
CGFloat radius = (self.bounds.size.width)/2;
CGFloat ratio = kArrowSizeRatio;
CGFloat segmentSize = self.bounds.size.width * ratio;
// Draw icon
UIBezierPath *path = [UIBezierPath bezierPath];
[path moveToPoint:CGPointMake(0.0, segmentSize * 3.3)];
[path addLineToPoint:CGPointMake(segmentSize * 2.0, segmentSize * 3.3)];
[path addLineToPoint:CGPointMake(segmentSize * 2.0, segmentSize * 2.3)];
[path addLineToPoint:CGPointMake(segmentSize * 3.0, segmentSize * 2.3)];
[path addLineToPoint:CGPointMake(segmentSize, 0)];
[path addLineToPoint:CGPointMake(-segmentSize, segmentSize * 2.3)];
[path addLineToPoint:CGPointMake(0.0, segmentSize * 2.3)];
[path addLineToPoint:CGPointMake(0.0, segmentSize * 3.3)];
[path closePath];
[path applyTransform:CGAffineTransformMakeTranslation(-segmentSize /2.0, -segmentSize / 0.9)];
[path applyTransform:CGAffineTransformMakeTranslation(radius * (1-ratio), radius * (1-ratio))];
_iconLayer.path = path.CGPath;
_iconLayer.fillColor = nil;
} I've also renamed the current method named |
+1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
having an upload arrow would be a nice addition.
-- René
The text was updated successfully, but these errors were encountered: