iOS UITableView Scroll to bottom of section

前端 未结 5 557
鱼传尺愫
鱼传尺愫 2021-01-01 23:48

I am going to make a tableview with 2 sections inside it. I can add cells to every section programmatically and when i add, i scroll to the end of tableview using



        
5条回答
  •  滥情空心
    2021-01-02 00:32

    when you inserting row at end you have its index path, you can use scrollToIndexPath method of tableview to scroll

    [self.liveChannelsTable scrollToRowAtIndexPath:IndexPath atScrollPosition:UITableViewScrollPositionTop animated:YES];
    

提交回复
热议问题