mirror of
https://github.com/zhigang1992/GitHawk.git
synced 2026-05-25 10:23:34 +08:00
add split VC delegate
This commit is contained in:
@@ -12,6 +12,7 @@ import Alamofire
|
||||
final class RootNavigationManager: GithubSessionListener {
|
||||
|
||||
private let sessionManager: GithubSessionManager
|
||||
private let splitDelegate = SplitViewControllerDelegate()
|
||||
|
||||
// weak refs to avoid cycles
|
||||
weak private var rootViewController: UISplitViewController?
|
||||
@@ -22,6 +23,7 @@ final class RootNavigationManager: GithubSessionListener {
|
||||
) {
|
||||
self.sessionManager = sessionManager
|
||||
self.rootViewController = rootViewController
|
||||
rootViewController.delegate = splitDelegate
|
||||
sessionManager.addListener(listener: self)
|
||||
}
|
||||
|
||||
|
||||
21
Classes/View Controllers/SplitViewControllerDelegate.swift
Normal file
21
Classes/View Controllers/SplitViewControllerDelegate.swift
Normal file
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// 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 {
|
||||
return true
|
||||
}
|
||||
|
||||
}
|
||||
@@ -231,6 +231,7 @@
|
||||
29A476A61ED23FAE005D0953 /* App.swift in Sources */ = {isa = PBXBuildFile; fileRef = 297AE85F1EC0D5C100B44A1F /* App.swift */; };
|
||||
29A476AA1ED24032005D0953 /* ListTestKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29C295091EC7AFA500D46CD2 /* ListTestKit.swift */; };
|
||||
29A476B21ED24D99005D0953 /* IssueTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29A476B11ED24D99005D0953 /* IssueTests.swift */; };
|
||||
29AC90E51F00A7C8000B80E4 /* SplitViewControllerDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29AC90E41F00A7C8000B80E4 /* SplitViewControllerDelegate.swift */; };
|
||||
29C0E7071ECBC6C50051D756 /* GithubClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29C0E7061ECBC6C50051D756 /* GithubClient.swift */; };
|
||||
29C167671ECA005500439D62 /* Strings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29C167661ECA005500439D62 /* Strings.swift */; };
|
||||
29C167691ECA016500439D62 /* EmptyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29C167681ECA016500439D62 /* EmptyView.swift */; };
|
||||
@@ -421,6 +422,7 @@
|
||||
29A4768D1ED07A23005D0953 /* DateDetailsFormatter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DateDetailsFormatter.swift; sourceTree = "<group>"; };
|
||||
29A4769F1ED0E6C6005D0953 /* UIColor+Overlay.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIColor+Overlay.swift"; sourceTree = "<group>"; };
|
||||
29A476B11ED24D99005D0953 /* IssueTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IssueTests.swift; sourceTree = "<group>"; };
|
||||
29AC90E41F00A7C8000B80E4 /* SplitViewControllerDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SplitViewControllerDelegate.swift; sourceTree = "<group>"; };
|
||||
29C0E7061ECBC6C50051D756 /* GithubClient.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GithubClient.swift; sourceTree = "<group>"; };
|
||||
29C167661ECA005500439D62 /* Strings.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Strings.swift; sourceTree = "<group>"; };
|
||||
29C167681ECA016500439D62 /* EmptyView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EmptyView.swift; sourceTree = "<group>"; };
|
||||
@@ -809,6 +811,7 @@
|
||||
29316DBE1ECC95DB007CAE3F /* RootViewControllers.swift */,
|
||||
297AE8691EC0D5C200B44A1F /* UIViewController+Alerts.swift */,
|
||||
297AE86A1EC0D5C200B44A1F /* UIViewController+LoadingIndicator.swift */,
|
||||
29AC90E41F00A7C8000B80E4 /* SplitViewControllerDelegate.swift */,
|
||||
);
|
||||
path = "View Controllers";
|
||||
sourceTree = "<group>";
|
||||
@@ -1208,6 +1211,7 @@
|
||||
29C9FDD31EC65FEE00EE3A52 /* Repository.swift in Sources */,
|
||||
292FCB191EDFCC510026635E /* IssueTitleSectionController.swift in Sources */,
|
||||
29C167741ECA0DBB00439D62 /* GithubAPIDateFormatter.swift in Sources */,
|
||||
29AC90E51F00A7C8000B80E4 /* SplitViewControllerDelegate.swift in Sources */,
|
||||
295840671EE89FE4007723C6 /* IssueClosedCell.swift in Sources */,
|
||||
29C9FDD01EC65FEE00EE3A52 /* Permission.swift in Sources */,
|
||||
292FCAFB1EDFCC510026635E /* IssueCommentImageCell.swift in Sources */,
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>27</string>
|
||||
<string>28</string>
|
||||
<key>LSApplicationQueriesSchemes</key>
|
||||
<array>
|
||||
<string>org-appextension-feature-password-management</string>
|
||||
|
||||
Reference in New Issue
Block a user