Skip to content

Instantly share code, notes, and snippets.

@codeswimmer
Created November 16, 2011 22:44
Show Gist options
  • Save codeswimmer/1371734 to your computer and use it in GitHub Desktop.
Save codeswimmer/1371734 to your computer and use it in GitHub Desktop.
iOS: drawing a triangle
-(UIBezierPath *)triangleWithPoints:(CGPoint *)points
{
UIBezierPath *path = [UIBezierPath bezierPath];
[path moveToPoint:points[0]]
[path addLineToPoint:points[1]];
[path addLineToPoint:points[2]];
[path closePath];
return path;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment