mirror of
https://github.com/zhigang1992/GitHawk.git
synced 2026-05-24 08:54:10 +08:00
27 lines
765 B
Swift
27 lines
765 B
Swift
//
|
|
// SplitViewControllerDelegate.swift
|
|
// Freetime
|
|
//
|
|
// Created by Ryan Nystrom on 6/25/17.
|
|
// Copyright © 2017 Ryan Nystrom. All rights reserved.
|
|
//
|
|
|
|
import UIKit
|
|
|
|
final class SplitViewControllerDelegate: UISplitViewControllerDelegate {
|
|
|
|
func splitViewController(
|
|
_ splitViewController: UISplitViewController,
|
|
collapseSecondary secondaryViewController: UIViewController,
|
|
onto primaryViewController: UIViewController
|
|
) -> Bool {
|
|
// use an empty class to detect if displaying a placeholder VC as details
|
|
if let nav = secondaryViewController as? UINavigationController,
|
|
nav.viewControllers.first is SplitPlaceholderViewController {
|
|
return true
|
|
}
|
|
return false
|
|
}
|
|
|
|
}
|