首页 > tableview滚动到底部的问题

tableview滚动到底部的问题

我希望滚动后的效果如图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];
}

}


self.tableView.contentInsets = UIEdgeInsetsMake(0, 0, 44, 0);
【热门文章】
【热门文章】