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

store cgpoint in userdefaults iOS swift