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

How to blink a button iOS swift?

iOS flutter while run to iPhone it had the error - Cannot find type 'PhoneNumberKit' in scope