Advertisement
Guest User

Untitled

a guest
Jul 26th, 2016
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) {
  2.  
  3. let selectedCell : emojiCell = emojiCollectionView.cellForItemAtIndexPath(indexPath) as! emojiCell
  4.  
  5. textDocumentProxy.insertText(" vibe | (allSongs[indexPath.row].song) by (allSongs[indexPath.row].artist) n (allSongs[indexPath.row].url)")
  6. print("Selected Cell")
  7.  
  8. UIView.animateWithDuration(0.7, animations: { () -> Void in
  9. selectedCell.copiedView.hidden = false
  10. selectedCell.copiedView.alpha = 1;
  11. }) { (completed) -> Void in
  12. UIView.animateWithDuration(0.7, delay: 1, options: UIViewAnimationOptions.CurveEaseOut, animations: { () -> Void in
  13. selectedCell.copiedView.alpha = 0
  14. }, completion: { (completed) -> Void in
  15. selectedCell.copiedView.hidden = true
  16. })
  17. }
  18. selectedCell.copiedView.hidden = false
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement