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

Convert NsNumber, NSDate to String in iOS Swift

Global LocationManager Singleton class iOS Swift