Guest User

Untitled

a guest
May 27th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. CGContextSaveGState(ctx);
  2.  
  3. NSData *data = [NSData dataWithContentsOfURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"tester" ofType:@"png"]]];
  4. UIImage *image = [[UIImage alloc] initWithData:data];
  5. CGRect box = CGRectMake(0.0f, 0.0f, image.size.width, image.size.height);
  6. CGContextTranslateCTM( ctx, 0,image.size.height);
  7. CGContextScaleCTM(ctx, 1.0, -1.0);
  8. self.layer.transform = CATransform3DMakeScale(zoom, zoom, 1.0f);
  9.  
  10. CGContextDrawImage(ctx, box, [image CGImage]);
Add Comment
Please, Sign In to add comment