Skip to content

Instantly share code, notes, and snippets.

@7gano
Created September 3, 2014 04:12

Revisions

  1. 7gano created this gist Sep 3, 2014.
    8 changes: 8 additions & 0 deletions MyView.m
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    - (void)drawRect:(CGRect)rect
    {
    CGContextRef context = UIGraphicsGetCurrentContext();
    CGContextAddRect(context, CGRectMake(50, 50, 200, 250));
    CGContextAddRect(context, CGRectMake(60, 60, 100, 100));
    CGContextSetRGBFillColor(context, 0, 0, 1, 1);
    CGContextDrawPath(context, kCGPathEOFill);
    }