ios - How to pass the UIView with a gesture recognizer as parameter? -


i use:

  tap.addtarget(self, action: "handletap:")   self.view.addgesturerecognizer(tap) 

i want access view.tag property of view in handletap method. how pass uiview "tap" in parameter of handletap?

thanks.

func handletap(sender:uitapgesturerecognizer) {     if let tag = sender.view?.tag {         println(tag)     } } 

Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -