我在UITapGesture
上收到UILabel
时遇到问题,这是UIPickerView
的子视图。
let statusDisplayLabel = UILabel(frame: CGRect(x: 0,
y: 0,
width: <#width of UIPickerView #>,
height: <# height of UIPickerView row #>))
statusDisplayLabel.isUserInteractionEnabled = true
let tapGesture = UITapGestureRecognizer(target: self,
action: #selector(didTapStatusDisplayLabel(tap:)))
tapGesture.numberOfTapsRequired = 1
tapGesture.numberOfTouchesRequired = 1
statusDisplayLabel.addGestureRecognizer(tapGesture)
<# UIPickerView #>.addSubview(statusDisplayLabel)
@objc func didTapStatusDisplayLabel(tap: UITapGestureRecognizer){
print("tapped")
}
UILabel
显示UIPickerView
上的statusDisplayLabel
。但是&#34;轻拍&#34;邮件永远不会显示在控制台中,因为点击只是UIPickerView
,而是移动UILabel
。好像<p:remoteCommand name="RC_name"
actionListener="#{TestBean.function}" />
<p:keyboard placeholder="Search"
value="#{menu.searchValue}"
layout="qwertyBasic"
onkeyup="RC_name()" >
<p:ajax event="click"
listener="#{menu.search()}"
update=":form:menuItems"/>
</p:keyboard>
不在那里
我错过了什么?