Skip to content

Instantly share code, notes, and snippets.

@justincbeck
Created February 6, 2013 14:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justincbeck/4723077 to your computer and use it in GitHub Desktop.
Save justincbeck/4723077 to your computer and use it in GitHub Desktop.
Add a shadow to a view...
UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"logo"]];
self.navigationItem.titleView = imageView;
[imageView setClipsToBounds:NO];
imageView.layer.shadowOffset = CGSizeMake(4.0f, 4.0f);
imageView.layer.shadowOpacity = 1.0f;
imageView.layer.shadowColor = [UIColor blackColor].CGColor;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment