对于tableView 的textView 或者textField 键盘处理
1. 显示键盘的时候 先 [self.tableView setContentInset:e]
2. 然后通过调用scrollToRowAtIndexPath 方法来滑动cell 底部
[UIView animateWithDuration:animationDuration/2.0 animations:^{
UIEdgeInsets e = UIEdgeInsetsMake(0, 0, heighOfOffY, 0);
// top, left, bottom, right(逆时针)
[self.tableView setContentInset:e];// 相当于 tableView 的 底部提高了 一个键盘的 高度
}completion:^(BOOL finished) {
if (self.currentIndex >= 0) {
[self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:self.currentIndex inSection:0] atScrollPosition:UITableViewScrollPositionBottom animated:YES];
}
}];