/hover_collection

Hover appear Toast in CollectionView Cell like Website

Primary LanguageSwift

Technicalisto

IOS Swift : Hover appear Toast in CollectionView Cell like Website

Github @Link

Follow Full Code this part


    @objc private func handleHover(_ gestureRecognizer: UILongPressGestureRecognizer) {
        let location = gestureRecognizer.location(in: collectionView)

        switch gestureRecognizer.state {
        case .began, .changed:
            if let indexPath = collectionView.indexPathForItem(at: location) {
                showHoverToast(at: location, for: indexPath)
            } else {
                dismissHoverToast()
            }
        case .ended, .cancelled:
            dismissHoverToast()
        default:
            break
        }
    }
    

Thanks

This app is inspired by Aya Baghdadi” and copyright for @Technicalisto