tableView cell 中如果有文本框點(diǎn)擊自動(dòng)滾動(dòng)不被鍵盤擋住
tableView 是繼承UIscrollView,所以自然有setContentOffset方法,該方法可以設(shè)置tableView的偏移量,那么通過(guò)該方法可以設(shè)置偏移量讓cell不被鍵盤擋住.
WeakSelf
[UIView animateWithDuration:0.3 animations:^{
[weakSelf.tableView setContentOffset:CGPointMake(0, cell.frame.origin.y)];
}];