How to focus on specific section when tableview is initialised

时间:2017-08-13 13:39:59

标签: ios swift tableview

I have a question regarding the tableview in swift 3.

I would like to go to a specific section when the tableview is initialised. I'm creating a calendar application and want to go to to section of the next coming event. I've googled and found nothing regarding this.

1 个答案:

答案 0 :(得分:0)

You can use something like...

tableView.scrollToRow(at: IndexPath, at: ScrollPosition, animated: Bool)

https://developer.apple.com/documentation/uikit/uitableview/1614997-scrolltorow