iPad UI 调整

This commit is contained in:
Fin 2024-09-11 11:45:05 +08:00
parent 7bacae4e21
commit adf0c1794e
2 changed files with 9 additions and 0 deletions

View File

@ -27,6 +27,9 @@ class BarkSplitViewController: UISplitViewController {
//
let index: Int = Settings[.selectedViewControllerIndex] ?? 0
self.setViewController(sectionViewController.viewControllers[index], for: .secondary)
DispatchQueue.main.async {
self.sectionViewController.tableView.selectRow(at: IndexPath(row: index, section: 0), animated: false, scrollPosition: .none)
}
self.setViewController(compactController, for: .compact)
}
}
@ -46,5 +49,6 @@ extension BarkSplitViewController: UISplitViewControllerDelegate {
return
}
self.sectionViewController.tableView.selectRow(at: IndexPath(row: index, section: 0), animated: false, scrollPosition: .none)
self.setViewController(self.sectionViewController.viewControllers[index], for: .secondary)
}
}

View File

@ -81,4 +81,9 @@ class SectionViewController_iPad: BaseViewController<SectionViewModel>, UITableV
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 55
}
func tableView(_ tableView: UITableView, canFocusRowAt indexPath: IndexPath) -> Bool {
// selectionStyle
return false
}
}