Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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);
collectionViewCell.layer.shadowPath = [UIBezierPath bezierPathWithRect:collectionViewCell.bounds].CGPath;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment