Skip to content

Commit 1170179

Browse files
author
Steve Trease
committed
Rebased to version 5 with a single tableview
1 parent 750d096 commit 1170179

File tree

9 files changed

+23
-227
lines changed

9 files changed

+23
-227
lines changed

.DS_Store

0 Bytes
Binary file not shown.

Swift Push 4.xcodeproj/project.pbxproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
/* Begin PBXBuildFile section */
1010
AA23B7D01B30BDA100B36271 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA23B7CF1B30BDA100B36271 /* AppDelegate.swift */; };
1111
AA23B7D21B30BDA100B36271 /* MasterViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA23B7D11B30BDA100B36271 /* MasterViewController.swift */; };
12-
AA23B7D41B30BDA100B36271 /* DetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA23B7D31B30BDA100B36271 /* DetailViewController.swift */; };
1312
AA23B7D71B30BDA100B36271 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AA23B7D51B30BDA100B36271 /* Main.storyboard */; };
1413
AA23B7D91B30BDA100B36271 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = AA23B7D81B30BDA100B36271 /* Assets.xcassets */; };
1514
AA23B7DC1B30BDA100B36271 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AA23B7DA1B30BDA100B36271 /* LaunchScreen.storyboard */; };
@@ -21,7 +20,6 @@
2120
AA23B7CC1B30BDA100B36271 /* Swift Push 4.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Swift Push 4.app"; sourceTree = BUILT_PRODUCTS_DIR; };
2221
AA23B7CF1B30BDA100B36271 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
2322
AA23B7D11B30BDA100B36271 /* MasterViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MasterViewController.swift; sourceTree = "<group>"; };
24-
AA23B7D31B30BDA100B36271 /* DetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DetailViewController.swift; sourceTree = "<group>"; };
2523
AA23B7D61B30BDA100B36271 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
2624
AA23B7D81B30BDA100B36271 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
2725
AA23B7DB1B30BDA100B36271 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
@@ -62,7 +60,6 @@
6260
children = (
6361
AA23B7CF1B30BDA100B36271 /* AppDelegate.swift */,
6462
AA23B7D11B30BDA100B36271 /* MasterViewController.swift */,
65-
AA23B7D31B30BDA100B36271 /* DetailViewController.swift */,
6663
AA23B7D51B30BDA100B36271 /* Main.storyboard */,
6764
AA23B7D81B30BDA100B36271 /* Assets.xcassets */,
6865
AA23B7DA1B30BDA100B36271 /* LaunchScreen.storyboard */,
@@ -167,7 +164,6 @@
167164
isa = PBXSourcesBuildPhase;
168165
buildActionMask = 2147483647;
169166
files = (
170-
AA23B7D41B30BDA100B36271 /* DetailViewController.swift in Sources */,
171167
AA23B7D21B30BDA100B36271 /* MasterViewController.swift in Sources */,
172168
AA23B7E41B30BE5600B36271 /* NotificationData.swift in Sources */,
173169
AA23B7D01B30BDA100B36271 /* AppDelegate.swift in Sources */,

Swift Push 4/.DS_Store

0 Bytes
Binary file not shown.

Swift Push 4/AppDelegate.swift

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,13 @@
99
import UIKit
1010

1111
@UIApplicationMain
12-
class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDelegate {
12+
class AppDelegate: UIResponder, UIApplicationDelegate {
1313

1414
var window: UIWindow?
1515

1616

1717
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
1818
// Override point for customization after application launch.
19-
let splitViewController = self.window!.rootViewController as! UISplitViewController
20-
let navigationController = splitViewController.viewControllers[splitViewController.viewControllers.count-1] as! UINavigationController
21-
navigationController.topViewController!.navigationItem.leftBarButtonItem = splitViewController.displayModeButtonItem()
22-
splitViewController.delegate = self
2319

2420
let versionNumber: AnyObject? = NSBundle.mainBundle().infoDictionary?["CFBundleVersion"]
2521
print ("version \(versionNumber!)")
@@ -146,18 +142,5 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele
146142
func applicationWillTerminate(application: UIApplication) {
147143
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
148144
}
149-
150-
// MARK: - Split view
151-
152-
func splitViewController(splitViewController: UISplitViewController, collapseSecondaryViewController secondaryViewController:UIViewController, ontoPrimaryViewController primaryViewController:UIViewController) -> Bool {
153-
guard let secondaryAsNavController = secondaryViewController as? UINavigationController else { return false }
154-
guard let topAsDetailController = secondaryAsNavController.topViewController as? DetailViewController else { return false }
155-
if topAsDetailController.detailItem == nil {
156-
// Return true to indicate that we have handled the collapse by doing nothing; the secondary controller will be discarded.
157-
return true
158-
}
159-
return false
160-
}
161-
162145
}
163146

0 commit comments

Comments
 (0)