[cpp]
/////UITextView
- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text
{
if ([text isEqualToString:@"\n"]) {
NSLog("點擊return");
return NO;
}
return YES;
}
/////UITextField
- (BOOL)textFieldShouldReturn:(UITextField *)textField
{
NSLog("點擊return");
return YES;
}