NSLog(@"ddd%f",cell.frame.origin.y);//获取当前cell在table中的位置
NSArray *a=[tableView visibleCells];//获取当前屏幕上的cell
CGPoint point = [tableView contentOffset];//在内容视图的起源到滚动视图的原点偏移。
NSLog(@"point %f",point.y);
1.
// IPAD键盘高度:
#define IPAD_PortraitKeyBordHeight 264
#define IPAD_LandscapeKeyBordHeight 352
// iPhone键盘高度:
#define IPhone_PortraitKeyBordHeight 216
#define Iphone_LandscapeKeyBordHeight 140
CGPoint point = [myTable contentOffset];//在内容视图的起源到滚动视图的原点偏移。
if(self.interfaceOrientation == UIInterfaceOrientationLandscapeLeft || self.interfaceOrientation == UIInterfaceOrientationLandscapeRight){
[myTable setContentOffset:CGPointMake(0, point.y + IPAD_LandscapeKeyBordHeight) animated:YES];
}else {
[myTable setContentOffset:CGPointMake(0, point.y + IPAD_PortraitKeyBordHeight) animated:YES];
}
2.
[tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:10-1 inSection:0]
atScrollPosition:UITableViewScrollPositionBottom animated:YES];
3.
tableView.frame = CGRectMake(0.0f, 0.0f, 320.0f, 372.0f);