mirror of
https://github.com/passepartoutvpn/passepartout-apple.git
synced 2025-01-17 22:19:08 +00:00
Scroll to selected option
This commit is contained in:
parent
03dd33852b
commit
6503e3e015
@ -46,6 +46,11 @@ class OptionViewController<T: Hashable>: UIViewController, UITableViewDataSource
|
||||
|
||||
tableView.dataSource = self
|
||||
tableView.delegate = self
|
||||
|
||||
if let selectedOption = selectedOption, let row = options.index(of: selectedOption) {
|
||||
tableView.reloadData()
|
||||
tableView.scrollToRowAsync(at: IndexPath(row: row, section: 0))
|
||||
}
|
||||
}
|
||||
|
||||
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
||||
|
Loading…
Reference in New Issue
Block a user