Skip to content

Instantly share code, notes, and snippets.

@jweinberg
Created June 24, 2011 22:03
Show Gist options
  • Save jweinberg/1045783 to your computer and use it in GitHub Desktop.
Save jweinberg/1045783 to your computer and use it in GitHub Desktop.
#import "JWPatternImageView.h"
@implementation JWPatternImageView
@synthesize patternImage;
- (void)dealloc;
{
self.patternImage = nil;
[super dealloc];
}
- (void)drawRect:(CGRect)rect;
{
CGContextRef ctx = UIGraphicsGetCurrentContext();
CGContextDrawTiledImage(ctx, (CGRect){CGPointZero, self.patternImage.size}, [self.patternImage CGImage]);
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment