tableview滚动到底部的问题

我希望滚动后的效果如图1,实际效果却是图2.代码在下面,求助。图1

图2

-(void)scrollToBottom
{

unsigned long count = self.frameModelArray.count;
if (count>0) {
    NSIndexPath *lastIndex = [NSIndexPath indexPathForRow:count-1 inSection:0];
    [self.tableView scrollToRowAtIndexPath:lastIndex atScrollPosition:UITableViewScrollPositionBottom animated:YES];
    [self.view layoutIfNeeded];
}

}

阅读 4.2k
1 个回答
self.tableView.contentInsets = UIEdgeInsetsMake(0, 0, 44, 0);
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题