[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillHide:) name:UIKeyboardWillHideNotification object:nil];
-(void)keyboardWillHide:(NSNotification *)notification
{
NSLog(@"*-----HideKeyBoard");
_bKeyBoardHide = YES;
_moveBGView.hidden = YES;
for (int i = 0; i < _dataArray.count; i ++) {
UITextView *textView = [self.view viewWithTag:i + 2000];
if ([textView.attributedText.string isEqual:@""]) {
NSMutableAttributedString * attString = [[NSMutableAttributedString alloc]initWithString:[NSString stringWithFormat:@"请输入内容"] attributes:_attributeDict1];
textView.attributedText = attString;
}
}
}
-(void)keyboardWillShow:(NSNotification *)notification
{
NSLog(@"*-----ShowKeyBoard");
_bKeyBoardHide = NO;
_moveBGView.hidden = NO;
}