Skip to content

Instantly share code, notes, and snippets.

View SteffenSr's full-sized avatar

Steffen Sørensen SteffenSr

  • Nuuday
  • Copenhagen
View GitHub Profile
@SteffenSr
SteffenSr / gist:3944797
Created October 24, 2012 08:22
UICollectionViewCell glow outline on didSelect
UICollectionViewCell* collectionViewCell = [self.collectionView cellForItemAtIndexPath:indexPath];
collectionViewCell.layer.masksToBounds = NO;
collectionViewCell.layer.cornerRadius = 8; // rounded corners
CGColorRef redColor = [UIColor colorWithRed:1.0 green:0.0
blue:0.0 alpha:1.0].CGColor;
collectionViewCell.layer.shadowColor = redColor;
collectionViewCell.layer.shadowOffset = CGSizeMake(-15, 20);
collectionViewCell.layer.shadowRadius = 5;
collectionViewCell.layer.shadowOpacity = 0.5;
collectionViewCell.layer.shadowOffset = CGSizeMake(10,10);