Created
March 1, 2015 12:04
-
-
Save jdarowski/93b9afa4ef2660256a1b to your computer and use it in GitHub Desktop.
Borders and rounded corners in UICollectionView
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { | |
UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"productCell" forIndexPath:indexPath]; | |
CALayer* layer = cell.layer; | |
[layer setCornerRadius:4.0f]; | |
[layer setBorderColor:[UIColor colorWithWhite:0.8 alpha:1].CGColor]; | |
[layer setBorderWidth:1.0f]; | |
return cell; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment