Get the sender object from UITapGestureRecognizer

 Solution:

                let tapGestureRecognizer = UITapGestureRecognizer(target: vc, action#selector(vc.tapEventAction(sender:)))

                cell.img.addGestureRecognizer(tapGestureRecognizer)

                }



When tap called 


    @objc func tapEventAction(senderUITapGestureRecognizer) {

        let btn = sender.view asUIImageView


}


Comments

Popular posts from this blog

Invalid bundle error while upload the app to the app Store

Saved Image in document directory and save path in coredata not able to fetch the image file iOS swift