Advertisement
Guest User

Untitled

a guest
Jan 2nd, 2012
305
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.39 KB | None | 0 0
  1. - (void)dropImageShadow {
  2.     CGMutablePathRef path = CGPathCreateMutable();
  3.     CGRect pathrect = CGRectMake(imageView.center.x - imageView.image.size.width/2,
  4.                                  imageView.center.y - imageView.image.size.height/2,
  5.                                  imageView.image.size.width,
  6.                                  imageView.image.size.height);
  7.    
  8.     CGPathAddRect(path, NULL, pathrect);
  9.     previewImage.layer.shadowPath = path;
  10.     CGPathRelease(path);
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement