Skip to content

Instantly share code, notes, and snippets.

@dimohamdy
Created April 27, 2019 15:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dimohamdy/ec62605437a4a4e56d0806cdedf3b54e to your computer and use it in GitHub Desktop.
Save dimohamdy/ec62605437a4a4e56d0806cdedf3b54e to your computer and use it in GitHub Desktop.
class IqraaliCollectionViewCell: UICollectionViewCell {
var book: BookEntity!
}
extension BookCollectionViewCell: UIViewControllerPreviewingDelegate {
func previewingContext(_ previewingContext: UIViewControllerPreviewing, viewControllerForLocation location: CGPoint) -> UIViewController? {
return AboutBookViewControllerWith(book)
}
func previewingContext(_ previewingContext: UIViewControllerPreviewing, commit viewControllerToCommit: UIViewController) {
sourceVC.show(viewControllerToCommit, sender: self)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment