You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am trying out this library with swift 4.2. It works fine so far except that giphyControllerDidCancel doesn't get called. giphyControllerDidSelectGif works fine though.
Here's my code.
class DPChatController: UIViewController, SwiftyGiphyViewControllerDelegate{
func giphyControllerDidSelectGif(controller: SwiftyGiphyViewController, item: GiphyItem) {
if let gifDownSized = item.downsizedImage {
//detailImageView.sd_setImage(with: gifDownSized.url)
}
// close gif selection controller via delegate. This doesn't work!
print("Am in Did Select gif")
//controller.dismiss(animated: true)
self.navigationController?.popViewController(animated: true)
self.inputBar.isHidden = false
}
func giphyControllerDidCancel(controller: SwiftyGiphyViewController) {
print("Am in Did Cancel")
self.navigationController?.popViewController(animated: true)
self.inputBar.isHidden = false
}
Hi, I am trying out this library with swift 4.2. It works fine so far except that giphyControllerDidCancel doesn't get called. giphyControllerDidSelectGif works fine though.
Here's my code.
class DPChatController: UIViewController, SwiftyGiphyViewControllerDelegate{
@IBAction func chooseProfileActions(_ sender: Any) {
messageTxt.resignFirstResponder()
inputBar.isHidden = true
let profileOptions = UIAlertController(title: "Choose options", message: "", preferredStyle: .actionSheet)
profileOptions.addAction(UIAlertAction(title: "Library", style: .default, handler: { (UIAlertAction) in
self.openPhotoLibrary(isPhoto: false)
}))
profileOptions.addAction(UIAlertAction(title: "Camera", style: .default, handler: { (UIAlertAction) in
self.openPhotoLibrary(isPhoto: true)
}))
profileOptions.addAction(UIAlertAction(title: "GIF", style: .default, handler: { (UIAlertAction) in
self.giphy.navigationController?.delegate = self
self.giphy.delegate = self
self.navigationController?.pushViewController(self.giphy, animated: true)
}))
profileOptions.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: { (UIAlertAction) in
print("User selected Cancel option")
self.inputBar.isHidden = false
})
}
The text was updated successfully, but these errors were encountered: