抛出的异常是:2012-09-21 00:46:56.885 Colors[3032:c07] -[UITextField value]: unrecognized selector sent to instance 0x718cce0 2012-09-21 00:46:56.887 Colors[3032:c07] *
实例 0x718cce0 是文本字段对象:
-(BOOL)textFieldShouldReturn:(UITextField *)textField
{
[textField resignFirstResponder];
return YES;
}
当我们返回 YES 时抛出异常,即使我们返回 NO。