标签:blog io ar os sp div on log bs
iOS 键盘的关闭
//通过委托来放弃 “第一响应者” #pragma mark - UITextField Delegate Method -(BOOL)textFieldShouldReturn:(UITextField*)textField { [textField resignFirstResponder]; return YES; } //通过委托来放弃 “第一响应者” #pragma mark - UITextView Delegate Method -(BOOL)textview:(UITextView *)textView shouldChangeTextInRange: (NSRange)range replacementText:(NSString *)text { if([text isEqualToString:@"\n"]){ [textView resignFirstResponder]; return NO; } return YES; }
标签:blog io ar os sp div on log bs
原文地址:http://www.cnblogs.com/penger/p/4099206.html