gpt4 book ai didi

ios - addTarget 函数在 addGestureRecognizer 函数触发后未触发

转载 作者:搜寻专家 更新时间:2023-11-01 07:04:25 24 4
gpt4 key购买 nike

<分区>

\\Action 1
textfield.addTarget(self, action: #selector(self.didChangeText(textField:)), for: .editingChanged)
textfield.tag = self.numarr

\\Action 2
let tap = UITapGestureRecognizer(target: self, action: #selector(self.handleTap(_:)))
textfield.addGestureRecognizer(tap)
textfield.isUserInteractionEnabled = true

两个函数都会触发,但会单独触发。当手势功能一起触发时,第二个(addTarget)不会触发。任何修复?

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com