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
Post a Comment