给我的UITextFeild 添加事件
UITextField *testFeild = [[UITextFieldalloc]initWithFrame:CGRectMake(0,80, 320, 40)];
[testFeild addTarget:selfaction:@selector(textValueChange:)forControlEvents:UIControlEventEditingChanged];
- (void)textValueChange:(id)sender
{
NSString *testString =testFeild.text;
(可以在判断是否为空)
}