Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jan 2nd, 2012  |  syntax: C  |  size: 0.39 KB  |  views: 226  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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. }
clone this paste RAW Paste Data