Skip to content

Instantly share code, notes, and snippets.

@justincbeck
Created August 12, 2014 18:22
Show Gist options
  • Save justincbeck/f942f6fa162e11995e89 to your computer and use it in GitHub Desktop.
Save justincbeck/f942f6fa162e11995e89 to your computer and use it in GitHub Desktop.
CALayer *mask = [CALayer layer];
mask.contents = (id)[[UIImage imageNamed:@"student_image_mask"] CGImage];
mask.frame = CGRectMake(0, 0, 80, 80);
[imgView.layer setCornerRadius:40.0];
[imgView.layer setBorderColor:[UIColor whiteColor].CGColor];
[imgView.layer setBorderWidth:3.0];
[imgView setBackgroundColor:[UIColor colorWithWhite:220.0/255.0 alpha:1.0]];
imgView.layer.mask = mask;
imgView.layer.masksToBounds = YES;
imgView.layer.shouldRasterize = YES;
imgView.layer.rasterizationScale = [[UIScreen mainScreen] scale];
@justincbeck
Copy link
Author

I took another look at this. You have the shadow radius set to 100.0. That completely crushed the UI. I took it back to 1.0 and it's MUCH better. I'll get it checked in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment