Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save ShawnPreval97/dd73480e1807ae05968b7a37e3d4580f to your computer and use it in GitHub Desktop.

Select an option

Save ShawnPreval97/dd73480e1807ae05968b7a37e3d4580f to your computer and use it in GitHub Desktop.

Revisions

  1. @nor0x nor0x renamed this gist Dec 22, 2016. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. @nor0x nor0x created this gist Dec 22, 2016.
    15 changes: 15 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
    cell.contentView.layer.cornerRadius = 2.0
    cell.contentView.layer.borderWidth = 1.0
    cell.contentView.layer.borderColor = UIColor.clear.cgColor
    cell.contentView.layer.masksToBounds = true;

    cell.layer.shadowColor = UIColor.lightGray.cgColor
    cell.layer.shadowOffset = CGSize(width:0,height: 2.0)
    cell.layer.shadowRadius = 2.0
    cell.layer.shadowOpacity = 1.0
    cell.layer.masksToBounds = false;
    cell.layer.shadowPath = UIBezierPath(roundedRect:cell.bounds, cornerRadius:cell.contentView.layer.cornerRadius).cgPath

    return cell
    }