Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) {
- let selectedCell : emojiCell = emojiCollectionView.cellForItemAtIndexPath(indexPath) as! emojiCell
- textDocumentProxy.insertText(" vibe | (allSongs[indexPath.row].song) by (allSongs[indexPath.row].artist) n (allSongs[indexPath.row].url)")
- print("Selected Cell")
- UIView.animateWithDuration(0.7, animations: { () -> Void in
- selectedCell.copiedView.hidden = false
- selectedCell.copiedView.alpha = 1;
- }) { (completed) -> Void in
- UIView.animateWithDuration(0.7, delay: 1, options: UIViewAnimationOptions.CurveEaseOut, animations: { () -> Void in
- selectedCell.copiedView.alpha = 0
- }, completion: { (completed) -> Void in
- selectedCell.copiedView.hidden = true
- })
- }
- selectedCell.copiedView.hidden = false
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement