Home Display button when UICollectionView Cell Tapped
Reply: 0

Display button when UICollectionView Cell Tapped

user831
1#
user831 Published in July 21, 2018, 8:45 pm

I'm having an Image and when user taps twice on that image then I show a button which has a tick sign as if like user has ticked that Image. I have set the button hidden at first from Storyboard.

I'm getting cell tap using this

func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
if collectionView == self.subOptionsCollectionView{
        let imageNamed = "\(customizeOptionSelected[indexPath.row])"

        shirtImage.image = UIImage(named: imageNamed)

        let tap = UITapGestureRecognizer(target: self, action: #selector(doubleTapped))
        tap.numberOfTapsRequired = 2
        collectionView.addGestureRecognizer(tap)
    }
}
func doubleTapped() {
    print("Double Tap")
}

But how do I display that tick/button ?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.315325 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO