答案 0 :(得分:0)
创建TextField的子类
class CustomTexrtField: UITextField {
//will see implementation later
}
现在只需覆盖其中的粘贴功能:)
override func paste(_ sender: Any?) {
super.paste(sender)
//do whatever you want to do here after paste
print("me here")
}
希望有所帮助