mirror of
https://github.com/Finb/Bark.git
synced 2025-12-08 21:36:01 +00:00
iPad UI 调整
This commit is contained in:
parent
7bacae4e21
commit
adf0c1794e
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user