iOS UItableview scrollToRowAtIndexPath not working anymore

前端 未结 9 632
不知归路
不知归路 2020-12-30 01:14

This morning I just installed new Xcode which includes iOS 6.

I have a table view loaded with a plist file containing chapters and lines. Chapters define the section

9条回答
  •  长情又很酷
    2020-12-30 01:45

    This works in iOS 12 and 13:

    DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) { 
        self.tableView.scrollToRow(at: IndexPath(row: 0, section: 1), at: .bottom, animated: true) 
    }
    

提交回复
热议问题