Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CGContextSaveGState(ctx);
- NSData *data = [NSData dataWithContentsOfURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"tester" ofType:@"png"]]];
- UIImage *image = [[UIImage alloc] initWithData:data];
- CGRect box = CGRectMake(0.0f, 0.0f, image.size.width, image.size.height);
- CGContextTranslateCTM( ctx, 0,image.size.height);
- CGContextScaleCTM(ctx, 1.0, -1.0);
- self.layer.transform = CATransform3DMakeScale(zoom, zoom, 1.0f);
- CGContextDrawImage(ctx, box, [image CGImage]);
Add Comment
Please, Sign In to add comment