标签: ios objective-c input uitextfield uitextview
如何确定用户是在UITextField中输入了字母还是从源中复制并粘贴在UITextField中?
答案 0 :(得分:2)
您可以子类UITextField并覆盖paste方法。每当你在textfield中粘贴任何东西时都会触发方法
paste
-(void)paste:(id)sender{ [super paste:sender]; //set some flag so that you know that text is pasted }