Fix handoff to iPad/Mac modally presenting new screen rather than pushing nav
This commit is contained in:
parent
361ce456cf
commit
0ba38e4a3a
|
@ -115,6 +115,14 @@ class MainSplitViewController: UISplitViewController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override func show(_ vc: UIViewController, sender: Any?) {
|
||||||
|
if traitCollection.horizontalSizeClass == .regular {
|
||||||
|
secondaryNavController.show(vc, sender: sender)
|
||||||
|
} else {
|
||||||
|
super.show(vc, sender: sender)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@objc func handleSidebarCommandTimelines() {
|
@objc func handleSidebarCommandTimelines() {
|
||||||
sidebar.select(item: .tab(.timelines), animated: false)
|
sidebar.select(item: .tab(.timelines), animated: false)
|
||||||
select(item: .tab(.timelines))
|
select(item: .tab(.timelines))
|
||||||
|
|
|
@ -305,9 +305,11 @@ private class SplitSecondaryNavigationController: EnhancedNavigationViewControll
|
||||||
}
|
}
|
||||||
|
|
||||||
override func pushViewController(_ viewController: UIViewController, animated: Bool) {
|
override func pushViewController(_ viewController: UIViewController, animated: Bool) {
|
||||||
super.pushViewController(viewController, animated: animated)
|
if viewControllers.isEmpty {
|
||||||
|
configureSecondarySplitCloseButton(for: viewController)
|
||||||
|
}
|
||||||
|
|
||||||
configureSecondarySplitCloseButton(for: viewControllers.first!)
|
super.pushViewController(viewController, animated: animated)
|
||||||
}
|
}
|
||||||
|
|
||||||
private func configureSecondarySplitCloseButton(for viewController: UIViewController) {
|
private func configureSecondarySplitCloseButton(for viewController: UIViewController) {
|
||||||
|
|
Loading…
Reference in New Issue