【发布时间】:2015-03-27 06:53:41
【问题描述】:
我正在尝试在不同的 uiview 上使用 UITapGestureRecognizer 触发事件,但它不起作用。
var tap = UITapGestureRecognizer(target: self, action: Selector("tappedMe"))
AUIView.addGestureRecognizer(tap)
AUIView.tag = 1
BUIView.addGestureRecognizer(tap)
BUIView.tag = 2
func tappedMe()
{
if AUIView.tag == 1
{
println("1")
}
else if BUIView.tag == 2
{
println("2")
}
}
【问题讨论】:
标签: ios swift uiview uigesturerecognizer