Skip to content

Instantly share code, notes, and snippets.

@pita5
Created December 22, 2011 12:21
Show Gist options
  • Save pita5/1510124 to your computer and use it in GitHub Desktop.
Save pita5/1510124 to your computer and use it in GitHub Desktop.
- (void)drawRect:(CGRect)rect
{
CGRect f = [self frame];
CGContextRef ctx = UIGraphicsGetCurrentContext();
CGContextSetFillColorWithColor(ctx, [UIColor clearColor].CGColor);
CGContextFillRect(ctx, rect);
CGContextScaleCTM(ctx, 1.3, 1.3);
CGContextTranslateCTM(ctx, -f.origin.x, -f.origin.y+80);
if (self.superview)
{
[self.superview.layer renderInContext:ctx];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment