我正在尝试添加一个UITapGesture
to a UIStackView
在 CollectionView 单元格中,但每次我执行应用程序都会崩溃。 (全部IBOutlets
已连接)我在这里做错了什么?
let fGuesture = UITapGestureRecognizer(target: self, action: #selector(self.showF(_:)))
cell.fstackView.addGestureRecognizer(fGuesture)
func showF(sender: AnyObject){
print(111)
}
stackview 是否启用了触摸功能?
尝试设置用户交互参数
cell.fstackView.isUserInteractionEnabled = true
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)