Skip to content

Instantly share code, notes, and snippets.

@ejknapp
Created September 19, 2012 00:28
Show Gist options
  • Save ejknapp/3746928 to your computer and use it in GitHub Desktop.
Save ejknapp/3746928 to your computer and use it in GitHub Desktop.
Drawing sample
- (void)drawRect:(CGRect)rect
{
// Drawing code
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextMoveToPoint(context, 100, 100);
CGContextAddLineToPoint(context, 200, 200);
CGContextAddRect(context, CGRectMake(200, 200, 100, 100));
CGContextStrokePath(context);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment