diff --git a/Library/SwiftyGiphyViewController.swift b/Library/SwiftyGiphyViewController.swift index eae5078..5b194e3 100644 --- a/Library/SwiftyGiphyViewController.swift +++ b/Library/SwiftyGiphyViewController.swift @@ -357,8 +357,10 @@ extension SwiftyGiphyViewController: UICollectionViewDelegate { public func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { collectionView.deselectItem(at: indexPath, animated: false) + let selectedGif = currentGifs![indexPath.row] + searchController.isActive = false - delegate?.giphyControllerDidSelectGif(controller: self, item: currentGifs![indexPath.row]) + delegate?.giphyControllerDidSelectGif(controller: self, item: selectedGif) } } diff --git a/SwiftyGiphy.podspec b/SwiftyGiphy.podspec index 2964149..f0bad4b 100644 --- a/SwiftyGiphy.podspec +++ b/SwiftyGiphy.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'SwiftyGiphy' - s.version = '1.0.3' + s.version = '1.0.4' s.summary = 'Provides a UI and API layer for Giphy discovery and integration.' # This description is used to generate tags and improve search results.