Skip to content

Commit

Permalink
Modify didSelectItem to prevent searchController deactivation from af…
Browse files Browse the repository at this point in the history
…fecting selected gif
  • Loading branch information
amyleecodes committed Mar 11, 2017
1 parent 3455426 commit eb172d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Library/SwiftyGiphyViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down
2 changes: 1 addition & 1 deletion SwiftyGiphy.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit eb172d4

Please sign in to comment.