Modification of the xCode Application

This change makes the application a tab based application on the Swift
iOS model
This commit is contained in:
Alexander Davis
2016-11-17 12:35:10 +00:00
parent 8c9aa14980
commit 0ab98ea7ea
14 changed files with 252 additions and 386 deletions

View File

@@ -7,48 +7,48 @@
objects = {
/* Begin PBXBuildFile section */
5F1F2F7B1DDDC4CC00194BCC /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F1F2F7A1DDDC4CC00194BCC /* AppDelegate.swift */; };
5F1F2F7D1DDDC4CC00194BCC /* MasterViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F1F2F7C1DDDC4CC00194BCC /* MasterViewController.swift */; };
5F1F2F7F1DDDC4CC00194BCC /* DetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F1F2F7E1DDDC4CC00194BCC /* DetailViewController.swift */; };
5F1F2F821DDDC4CC00194BCC /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5F1F2F801DDDC4CC00194BCC /* Main.storyboard */; };
5F1F2F841DDDC4CC00194BCC /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5F1F2F831DDDC4CC00194BCC /* Assets.xcassets */; };
5F1F2F871DDDC4CC00194BCC /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5F1F2F851DDDC4CC00194BCC /* LaunchScreen.storyboard */; };
5F1F2F921DDDC4CD00194BCC /* Task_MasterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F1F2F911DDDC4CD00194BCC /* Task_MasterTests.swift */; };
5F26CD831DDDDAF6008452B2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F26CD821DDDDAF6008452B2 /* AppDelegate.swift */; };
5F26CD851DDDDAF6008452B2 /* FirstViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F26CD841DDDDAF6008452B2 /* FirstViewController.swift */; };
5F26CD871DDDDAF6008452B2 /* SecondViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F26CD861DDDDAF6008452B2 /* SecondViewController.swift */; };
5F26CD8A1DDDDAF6008452B2 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5F26CD881DDDDAF6008452B2 /* Main.storyboard */; };
5F26CD8C1DDDDAF6008452B2 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5F26CD8B1DDDDAF6008452B2 /* Assets.xcassets */; };
5F26CD8F1DDDDAF6008452B2 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5F26CD8D1DDDDAF6008452B2 /* LaunchScreen.storyboard */; };
5F26CD9A1DDDDAF6008452B2 /* Task_MasterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F26CD991DDDDAF6008452B2 /* Task_MasterTests.swift */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
5F1F2F8E1DDDC4CD00194BCC /* PBXContainerItemProxy */ = {
5F26CD961DDDDAF6008452B2 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 5F1F2F6F1DDDC4CC00194BCC /* Project object */;
containerPortal = 5F26CD771DDDDAF6008452B2 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 5F1F2F761DDDC4CC00194BCC;
remoteGlobalIDString = 5F26CD7E1DDDDAF6008452B2;
remoteInfo = "Task Master";
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
5F1F2F771DDDC4CC00194BCC /* Task Master.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Task Master.app"; sourceTree = BUILT_PRODUCTS_DIR; };
5F1F2F7A1DDDC4CC00194BCC /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
5F1F2F7C1DDDC4CC00194BCC /* MasterViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MasterViewController.swift; sourceTree = "<group>"; };
5F1F2F7E1DDDC4CC00194BCC /* DetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DetailViewController.swift; sourceTree = "<group>"; };
5F1F2F811DDDC4CC00194BCC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
5F1F2F831DDDC4CC00194BCC /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
5F1F2F861DDDC4CC00194BCC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
5F1F2F881DDDC4CC00194BCC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
5F1F2F8D1DDDC4CD00194BCC /* Task MasterTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Task MasterTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
5F1F2F911DDDC4CD00194BCC /* Task_MasterTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Task_MasterTests.swift; sourceTree = "<group>"; };
5F1F2F931DDDC4CD00194BCC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
5F26CD7F1DDDDAF6008452B2 /* Task Master.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Task Master.app"; sourceTree = BUILT_PRODUCTS_DIR; };
5F26CD821DDDDAF6008452B2 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
5F26CD841DDDDAF6008452B2 /* FirstViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FirstViewController.swift; sourceTree = "<group>"; };
5F26CD861DDDDAF6008452B2 /* SecondViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecondViewController.swift; sourceTree = "<group>"; };
5F26CD891DDDDAF6008452B2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
5F26CD8B1DDDDAF6008452B2 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
5F26CD8E1DDDDAF6008452B2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
5F26CD901DDDDAF6008452B2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
5F26CD951DDDDAF6008452B2 /* Task MasterTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Task MasterTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
5F26CD991DDDDAF6008452B2 /* Task_MasterTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Task_MasterTests.swift; sourceTree = "<group>"; };
5F26CD9B1DDDDAF6008452B2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
5F1F2F741DDDC4CC00194BCC /* Frameworks */ = {
5F26CD7C1DDDDAF6008452B2 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
5F1F2F8A1DDDC4CD00194BCC /* Frameworks */ = {
5F26CD921DDDDAF6008452B2 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
@@ -58,43 +58,43 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
5F1F2F6E1DDDC4CC00194BCC = {
5F26CD761DDDDAF6008452B2 = {
isa = PBXGroup;
children = (
5F1F2F791DDDC4CC00194BCC /* Task Master */,
5F1F2F901DDDC4CD00194BCC /* Task MasterTests */,
5F1F2F781DDDC4CC00194BCC /* Products */,
5F26CD811DDDDAF6008452B2 /* Task Master */,
5F26CD981DDDDAF6008452B2 /* Task MasterTests */,
5F26CD801DDDDAF6008452B2 /* Products */,
);
sourceTree = "<group>";
};
5F1F2F781DDDC4CC00194BCC /* Products */ = {
5F26CD801DDDDAF6008452B2 /* Products */ = {
isa = PBXGroup;
children = (
5F1F2F771DDDC4CC00194BCC /* Task Master.app */,
5F1F2F8D1DDDC4CD00194BCC /* Task MasterTests.xctest */,
5F26CD7F1DDDDAF6008452B2 /* Task Master.app */,
5F26CD951DDDDAF6008452B2 /* Task MasterTests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
5F1F2F791DDDC4CC00194BCC /* Task Master */ = {
5F26CD811DDDDAF6008452B2 /* Task Master */ = {
isa = PBXGroup;
children = (
5F1F2F7A1DDDC4CC00194BCC /* AppDelegate.swift */,
5F1F2F7C1DDDC4CC00194BCC /* MasterViewController.swift */,
5F1F2F7E1DDDC4CC00194BCC /* DetailViewController.swift */,
5F1F2F801DDDC4CC00194BCC /* Main.storyboard */,
5F1F2F831DDDC4CC00194BCC /* Assets.xcassets */,
5F1F2F851DDDC4CC00194BCC /* LaunchScreen.storyboard */,
5F1F2F881DDDC4CC00194BCC /* Info.plist */,
5F26CD821DDDDAF6008452B2 /* AppDelegate.swift */,
5F26CD841DDDDAF6008452B2 /* FirstViewController.swift */,
5F26CD861DDDDAF6008452B2 /* SecondViewController.swift */,
5F26CD881DDDDAF6008452B2 /* Main.storyboard */,
5F26CD8B1DDDDAF6008452B2 /* Assets.xcassets */,
5F26CD8D1DDDDAF6008452B2 /* LaunchScreen.storyboard */,
5F26CD901DDDDAF6008452B2 /* Info.plist */,
);
path = "Task Master";
sourceTree = "<group>";
};
5F1F2F901DDDC4CD00194BCC /* Task MasterTests */ = {
5F26CD981DDDDAF6008452B2 /* Task MasterTests */ = {
isa = PBXGroup;
children = (
5F1F2F911DDDC4CD00194BCC /* Task_MasterTests.swift */,
5F1F2F931DDDC4CD00194BCC /* Info.plist */,
5F26CD991DDDDAF6008452B2 /* Task_MasterTests.swift */,
5F26CD9B1DDDDAF6008452B2 /* Info.plist */,
);
path = "Task MasterTests";
sourceTree = "<group>";
@@ -102,13 +102,13 @@
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
5F1F2F761DDDC4CC00194BCC /* Task Master */ = {
5F26CD7E1DDDDAF6008452B2 /* Task Master */ = {
isa = PBXNativeTarget;
buildConfigurationList = 5F1F2F961DDDC4CD00194BCC /* Build configuration list for PBXNativeTarget "Task Master" */;
buildConfigurationList = 5F26CD9E1DDDDAF6008452B2 /* Build configuration list for PBXNativeTarget "Task Master" */;
buildPhases = (
5F1F2F731DDDC4CC00194BCC /* Sources */,
5F1F2F741DDDC4CC00194BCC /* Frameworks */,
5F1F2F751DDDC4CC00194BCC /* Resources */,
5F26CD7B1DDDDAF6008452B2 /* Sources */,
5F26CD7C1DDDDAF6008452B2 /* Frameworks */,
5F26CD7D1DDDDAF6008452B2 /* Resources */,
);
buildRules = (
);
@@ -116,51 +116,51 @@
);
name = "Task Master";
productName = "Task Master";
productReference = 5F1F2F771DDDC4CC00194BCC /* Task Master.app */;
productReference = 5F26CD7F1DDDDAF6008452B2 /* Task Master.app */;
productType = "com.apple.product-type.application";
};
5F1F2F8C1DDDC4CD00194BCC /* Task MasterTests */ = {
5F26CD941DDDDAF6008452B2 /* Task MasterTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 5F1F2F991DDDC4CD00194BCC /* Build configuration list for PBXNativeTarget "Task MasterTests" */;
buildConfigurationList = 5F26CDA11DDDDAF6008452B2 /* Build configuration list for PBXNativeTarget "Task MasterTests" */;
buildPhases = (
5F1F2F891DDDC4CD00194BCC /* Sources */,
5F1F2F8A1DDDC4CD00194BCC /* Frameworks */,
5F1F2F8B1DDDC4CD00194BCC /* Resources */,
5F26CD911DDDDAF6008452B2 /* Sources */,
5F26CD921DDDDAF6008452B2 /* Frameworks */,
5F26CD931DDDDAF6008452B2 /* Resources */,
);
buildRules = (
);
dependencies = (
5F1F2F8F1DDDC4CD00194BCC /* PBXTargetDependency */,
5F26CD971DDDDAF6008452B2 /* PBXTargetDependency */,
);
name = "Task MasterTests";
productName = "Task MasterTests";
productReference = 5F1F2F8D1DDDC4CD00194BCC /* Task MasterTests.xctest */;
productReference = 5F26CD951DDDDAF6008452B2 /* Task MasterTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
5F1F2F6F1DDDC4CC00194BCC /* Project object */ = {
5F26CD771DDDDAF6008452B2 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0810;
LastUpgradeCheck = 0810;
ORGANIZATIONNAME = "Alexander Davis Computing and Media";
TargetAttributes = {
5F1F2F761DDDC4CC00194BCC = {
5F26CD7E1DDDDAF6008452B2 = {
CreatedOnToolsVersion = 8.1;
DevelopmentTeam = 28CC8SCVUN;
ProvisioningStyle = Automatic;
};
5F1F2F8C1DDDC4CD00194BCC = {
5F26CD941DDDDAF6008452B2 = {
CreatedOnToolsVersion = 8.1;
DevelopmentTeam = 28CC8SCVUN;
ProvisioningStyle = Automatic;
TestTargetID = 5F1F2F761DDDC4CC00194BCC;
TestTargetID = 5F26CD7E1DDDDAF6008452B2;
};
};
};
buildConfigurationList = 5F1F2F721DDDC4CC00194BCC /* Build configuration list for PBXProject "Task Master" */;
buildConfigurationList = 5F26CD7A1DDDDAF6008452B2 /* Build configuration list for PBXProject "Task Master" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
@@ -168,29 +168,29 @@
en,
Base,
);
mainGroup = 5F1F2F6E1DDDC4CC00194BCC;
productRefGroup = 5F1F2F781DDDC4CC00194BCC /* Products */;
mainGroup = 5F26CD761DDDDAF6008452B2;
productRefGroup = 5F26CD801DDDDAF6008452B2 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
5F1F2F761DDDC4CC00194BCC /* Task Master */,
5F1F2F8C1DDDC4CD00194BCC /* Task MasterTests */,
5F26CD7E1DDDDAF6008452B2 /* Task Master */,
5F26CD941DDDDAF6008452B2 /* Task MasterTests */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
5F1F2F751DDDC4CC00194BCC /* Resources */ = {
5F26CD7D1DDDDAF6008452B2 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
5F1F2F871DDDC4CC00194BCC /* LaunchScreen.storyboard in Resources */,
5F1F2F841DDDC4CC00194BCC /* Assets.xcassets in Resources */,
5F1F2F821DDDC4CC00194BCC /* Main.storyboard in Resources */,
5F26CD8F1DDDDAF6008452B2 /* LaunchScreen.storyboard in Resources */,
5F26CD8C1DDDDAF6008452B2 /* Assets.xcassets in Resources */,
5F26CD8A1DDDDAF6008452B2 /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
5F1F2F8B1DDDC4CD00194BCC /* Resources */ = {
5F26CD931DDDDAF6008452B2 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
@@ -200,47 +200,47 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
5F1F2F731DDDC4CC00194BCC /* Sources */ = {
5F26CD7B1DDDDAF6008452B2 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
5F1F2F7F1DDDC4CC00194BCC /* DetailViewController.swift in Sources */,
5F1F2F7D1DDDC4CC00194BCC /* MasterViewController.swift in Sources */,
5F1F2F7B1DDDC4CC00194BCC /* AppDelegate.swift in Sources */,
5F26CD871DDDDAF6008452B2 /* SecondViewController.swift in Sources */,
5F26CD831DDDDAF6008452B2 /* AppDelegate.swift in Sources */,
5F26CD851DDDDAF6008452B2 /* FirstViewController.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
5F1F2F891DDDC4CD00194BCC /* Sources */ = {
5F26CD911DDDDAF6008452B2 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
5F1F2F921DDDC4CD00194BCC /* Task_MasterTests.swift in Sources */,
5F26CD9A1DDDDAF6008452B2 /* Task_MasterTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
5F1F2F8F1DDDC4CD00194BCC /* PBXTargetDependency */ = {
5F26CD971DDDDAF6008452B2 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 5F1F2F761DDDC4CC00194BCC /* Task Master */;
targetProxy = 5F1F2F8E1DDDC4CD00194BCC /* PBXContainerItemProxy */;
target = 5F26CD7E1DDDDAF6008452B2 /* Task Master */;
targetProxy = 5F26CD961DDDDAF6008452B2 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
5F1F2F801DDDC4CC00194BCC /* Main.storyboard */ = {
5F26CD881DDDDAF6008452B2 /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
5F1F2F811DDDC4CC00194BCC /* Base */,
5F26CD891DDDDAF6008452B2 /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
5F1F2F851DDDC4CC00194BCC /* LaunchScreen.storyboard */ = {
5F26CD8D1DDDDAF6008452B2 /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
5F1F2F861DDDC4CC00194BCC /* Base */,
5F26CD8E1DDDDAF6008452B2 /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
@@ -248,7 +248,7 @@
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
5F1F2F941DDDC4CD00194BCC /* Debug */ = {
5F26CD9C1DDDDAF6008452B2 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
@@ -297,7 +297,7 @@
};
name = Debug;
};
5F1F2F951DDDC4CD00194BCC /* Release */ = {
5F26CD9D1DDDDAF6008452B2 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
@@ -339,7 +339,7 @@
};
name = Release;
};
5F1F2F971DDDC4CD00194BCC /* Debug */ = {
5F26CD9F1DDDDAF6008452B2 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
@@ -352,7 +352,7 @@
};
name = Debug;
};
5F1F2F981DDDC4CD00194BCC /* Release */ = {
5F26CDA01DDDDAF6008452B2 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
@@ -365,7 +365,7 @@
};
name = Release;
};
5F1F2F9A1DDDC4CD00194BCC /* Debug */ = {
5F26CDA21DDDDAF6008452B2 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
@@ -380,7 +380,7 @@
};
name = Debug;
};
5F1F2F9B1DDDC4CD00194BCC /* Release */ = {
5F26CDA31DDDDAF6008452B2 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
@@ -398,32 +398,32 @@
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
5F1F2F721DDDC4CC00194BCC /* Build configuration list for PBXProject "Task Master" */ = {
5F26CD7A1DDDDAF6008452B2 /* Build configuration list for PBXProject "Task Master" */ = {
isa = XCConfigurationList;
buildConfigurations = (
5F1F2F941DDDC4CD00194BCC /* Debug */,
5F1F2F951DDDC4CD00194BCC /* Release */,
5F26CD9C1DDDDAF6008452B2 /* Debug */,
5F26CD9D1DDDDAF6008452B2 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
5F1F2F961DDDC4CD00194BCC /* Build configuration list for PBXNativeTarget "Task Master" */ = {
5F26CD9E1DDDDAF6008452B2 /* Build configuration list for PBXNativeTarget "Task Master" */ = {
isa = XCConfigurationList;
buildConfigurations = (
5F1F2F971DDDC4CD00194BCC /* Debug */,
5F1F2F981DDDC4CD00194BCC /* Release */,
5F26CD9F1DDDDAF6008452B2 /* Debug */,
5F26CDA01DDDDAF6008452B2 /* Release */,
);
defaultConfigurationIsVisible = 0;
};
5F1F2F991DDDC4CD00194BCC /* Build configuration list for PBXNativeTarget "Task MasterTests" */ = {
5F26CDA11DDDDAF6008452B2 /* Build configuration list for PBXNativeTarget "Task MasterTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
5F1F2F9A1DDDC4CD00194BCC /* Debug */,
5F1F2F9B1DDDC4CD00194BCC /* Release */,
5F26CDA21DDDDAF6008452B2 /* Debug */,
5F26CDA31DDDDAF6008452B2 /* Release */,
);
defaultConfigurationIsVisible = 0;
};
/* End XCConfigurationList section */
};
rootObject = 5F1F2F6F1DDDC4CC00194BCC /* Project object */;
rootObject = 5F26CD771DDDDAF6008452B2 /* Project object */;
}

View File

@@ -14,7 +14,7 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "5F1F2F761DDDC4CC00194BCC"
BlueprintIdentifier = "5F26CD7E1DDDDAF6008452B2"
BuildableName = "Task Master.app"
BlueprintName = "Task Master"
ReferencedContainer = "container:Task Master.xcodeproj">
@@ -32,7 +32,7 @@
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "5F1F2F8C1DDDC4CD00194BCC"
BlueprintIdentifier = "5F26CD941DDDDAF6008452B2"
BuildableName = "Task MasterTests.xctest"
BlueprintName = "Task MasterTests"
ReferencedContainer = "container:Task Master.xcodeproj">
@@ -42,7 +42,7 @@
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "5F1F2F761DDDC4CC00194BCC"
BlueprintIdentifier = "5F26CD7E1DDDDAF6008452B2"
BuildableName = "Task Master.app"
BlueprintName = "Task Master"
ReferencedContainer = "container:Task Master.xcodeproj">
@@ -65,7 +65,7 @@
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "5F1F2F761DDDC4CC00194BCC"
BlueprintIdentifier = "5F26CD7E1DDDDAF6008452B2"
BuildableName = "Task Master.app"
BlueprintName = "Task Master"
ReferencedContainer = "container:Task Master.xcodeproj">
@@ -84,7 +84,7 @@
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "5F1F2F761DDDC4CC00194BCC"
BlueprintIdentifier = "5F26CD7E1DDDDAF6008452B2"
BuildableName = "Task Master.app"
BlueprintName = "Task Master"
ReferencedContainer = "container:Task Master.xcodeproj">

View File

@@ -12,12 +12,12 @@
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>5F1F2F761DDDC4CC00194BCC</key>
<key>5F26CD7E1DDDDAF6008452B2</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>5F1F2F8C1DDDC4CD00194BCC</key>
<key>5F26CD941DDDDAF6008452B2</key>
<dict>
<key>primary</key>
<true/>

View File

@@ -9,17 +9,13 @@
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDelegate {
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
let splitViewController = self.window!.rootViewController as! UISplitViewController
let navigationController = splitViewController.viewControllers[splitViewController.viewControllers.count-1] as! UINavigationController
navigationController.topViewController!.navigationItem.leftBarButtonItem = splitViewController.displayModeButtonItem
splitViewController.delegate = self
return true
}
@@ -45,17 +41,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
// MARK: - Split view
func splitViewController(_ splitViewController: UISplitViewController, collapseSecondary secondaryViewController:UIViewController, onto primaryViewController:UIViewController) -> Bool {
guard let secondaryAsNavController = secondaryViewController as? UINavigationController else { return false }
guard let topAsDetailController = secondaryAsNavController.topViewController as? DetailViewController else { return false }
if topAsDetailController.detailItem == nil {
// Return true to indicate that we have handled the collapse by doing nothing; the secondary controller will be discarded.
return true
}
return false
}
}

View File

@@ -0,0 +1,12 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "first.pdf"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

View File

@@ -0,0 +1,12 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "second.pdf"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

View File

@@ -1,162 +1,108 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11542" systemVersion="16B2555" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="H1p-Uh-vWS">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11134" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="49e-Tb-3d3">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11524"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11106"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Master-->
<scene sceneID="pY4-Hu-kfo">
<!--First-->
<scene sceneID="hNz-n2-bh7">
<objects>
<navigationController title="Master" id="RMx-3f-FxP" sceneMemberID="viewController">
<navigationBar key="navigationBar" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" misplaced="YES" id="Pmd-2v-anx">
<rect key="frame" x="0.0" y="0.0" width="1000" height="1000"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<connections>
<segue destination="7bK-jq-Zjz" kind="relationship" relationship="rootViewController" id="tsl-Nk-0bq"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="8fS-aE-onr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-38" y="-630"/>
</scene>
<!--Detail-->
<scene sceneID="yUG-lL-AsK">
<objects>
<viewController title="Detail" id="JEX-9P-axG" customClass="DetailViewController" customModule="Task_Master" customModuleProvider="target" sceneMemberID="viewController">
<viewController id="9pv-A4-QxB" customClass="FirstViewController" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="SYR-Wa-9uf"/>
<viewControllerLayoutGuide type="bottom" id="GAO-Cl-Wes"/>
<viewControllerLayoutGuide type="top" id="Ia1-K6-d13"/>
<viewControllerLayoutGuide type="bottom" id="4ug-Mw-9AY"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="svH-Pt-448">
<view key="view" contentMode="scaleToFill" id="tsR-hK-woN">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="Detail view content goes here" textAlignment="center" lineBreakMode="tailTruncation" minimumFontSize="10" translatesAutoresizingMaskIntoConstraints="NO" id="0XM-y9-sOw">
<rect key="frame" x="20" y="325" width="335" height="17"/>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="First View" textAlignment="center" lineBreakMode="tailTruncation" minimumFontSize="10" translatesAutoresizingMaskIntoConstraints="NO" id="KQZ-1w-vlD">
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="system" size="system"/>
<fontDescription key="fontDescription" name="Helvetica" family="Helvetica" pointSize="36"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Loaded by FirstViewController" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="A5M-7J-77L">
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="0XM-y9-sOw" firstAttribute="leading" secondItem="svH-Pt-448" secondAttribute="leading" constant="20" symbolic="YES" id="Tsc-yG-G1q"/>
<constraint firstItem="0XM-y9-sOw" firstAttribute="centerY" secondItem="svH-Pt-448" secondAttribute="centerY" id="jWN-iV-94e"/>
<constraint firstAttribute="trailing" secondItem="0XM-y9-sOw" secondAttribute="trailing" constant="20" symbolic="YES" id="tHV-ZD-HQj"/>
<constraint firstAttribute="centerX" secondItem="KQZ-1w-vlD" secondAttribute="centerX" id="6BV-lF-sBN"/>
<constraint firstItem="A5M-7J-77L" firstAttribute="top" secondItem="KQZ-1w-vlD" secondAttribute="bottom" constant="8" symbolic="YES" id="cfb-er-3JN"/>
<constraint firstItem="A5M-7J-77L" firstAttribute="centerX" secondItem="KQZ-1w-vlD" secondAttribute="centerX" id="e1l-AV-tCB"/>
<constraint firstAttribute="centerY" secondItem="KQZ-1w-vlD" secondAttribute="centerY" id="exm-UA-ej4"/>
</constraints>
</view>
<toolbarItems/>
<navigationItem key="navigationItem" title="Detail" id="mOI-FS-AaM"/>
<connections>
<outlet property="detailDescriptionLabel" destination="0XM-y9-sOw" id="deQ-Na-JPF"/>
</connections>
<tabBarItem key="tabBarItem" title="First" image="first" id="acW-dT-cKf"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="FJe-Yq-33r" sceneMemberID="firstResponder"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="W5J-7L-Pyd" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="709" y="129"/>
<point key="canvasLocation" x="750" y="-320"/>
</scene>
<!--Split View Controller-->
<scene sceneID="Nki-YV-4Qg">
<!--Second-->
<scene sceneID="wg7-f3-ORb">
<objects>
<splitViewController id="H1p-Uh-vWS" sceneMemberID="viewController">
<toolbarItems/>
<connections>
<segue destination="RMx-3f-FxP" kind="relationship" relationship="masterViewController" id="BlO-5A-QYV"/>
<segue destination="vC3-pB-5Vb" kind="relationship" relationship="detailViewController" id="Tll-UG-LXB"/>
</connections>
</splitViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="cZU-Oi-B1e" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-856" y="-330"/>
</scene>
<!--Master-->
<scene sceneID="smW-Zh-WAh">
<objects>
<tableViewController title="Master" clearsSelectionOnViewWillAppear="NO" id="7bK-jq-Zjz" customClass="MasterViewController" customModule="Task_Master" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="r7i-6Z-zg0">
<viewController id="8rJ-Kc-sve" customClass="SecondViewController" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="L7p-HK-0SC"/>
<viewControllerLayoutGuide type="bottom" id="Djb-ko-YwX"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="QS5-Rx-YEW">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<searchBar key="tableFooterView" contentMode="redraw" id="ggP-rt-M1Z">
<rect key="frame" x="0.0" y="130" width="375" height="44"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<textInputTraits key="textInputTraits"/>
<connections>
<outlet property="delegate" destination="7bK-jq-Zjz" id="2Ro-pl-BL1"/>
</connections>
</searchBar>
<prototypes>
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Cell" textLabel="Arm-wq-HPj" style="IBUITableViewCellStyleDefault" id="WCw-Qf-5nD">
<rect key="frame" x="0.0" y="22" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="WCw-Qf-5nD" id="37f-cq-3Eg">
<rect key="frame" x="0.0" y="0.0" width="375" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" text="Task Master" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Arm-wq-HPj">
<rect key="frame" x="15" y="0.0" width="345" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="20"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</label>
</subviews>
</tableViewCellContentView>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="Second View" textAlignment="center" lineBreakMode="tailTruncation" minimumFontSize="10" translatesAutoresizingMaskIntoConstraints="NO" id="zEq-FU-wV5">
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<connections>
<segue destination="vC3-pB-5Vb" kind="showDetail" identifier="showDetail" id="6S0-TO-JiA"/>
</connections>
</tableViewCell>
</prototypes>
<sections/>
<connections>
<outlet property="dataSource" destination="7bK-jq-Zjz" id="Gho-Na-rnu"/>
<outlet property="delegate" destination="7bK-jq-Zjz" id="RA6-mI-bju"/>
</connections>
</tableView>
<navigationItem key="navigationItem" title="Task Master" id="Zdf-7t-Un8"/>
<connections>
<outlet property="searchDisplayController" destination="VYd-pA-Mgb" id="9AL-N0-6Tt"/>
</connections>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Rux-fX-hf1" sceneMemberID="firstResponder"/>
<searchDisplayController id="VYd-pA-Mgb">
<connections>
<outlet property="delegate" destination="7bK-jq-Zjz" id="Tvv-0X-Psi"/>
<outlet property="searchBar" destination="ggP-rt-M1Z" id="Vdh-mU-Gto"/>
<outlet property="searchContentsController" destination="7bK-jq-Zjz" id="dzm-OM-ntD"/>
<outlet property="searchResultsDataSource" destination="7bK-jq-Zjz" id="e4B-LB-zUq"/>
<outlet property="searchResultsDelegate" destination="7bK-jq-Zjz" id="m2I-bE-ZUN"/>
</connections>
</searchDisplayController>
<fontDescription key="fontDescription" name="Helvetica" family="Helvetica" pointSize="36"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Loaded by SecondViewController" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="NDk-cv-Gan">
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="NDk-cv-Gan" firstAttribute="top" secondItem="zEq-FU-wV5" secondAttribute="bottom" constant="8" symbolic="YES" id="Day-4N-Vmt"/>
<constraint firstItem="NDk-cv-Gan" firstAttribute="centerX" secondItem="zEq-FU-wV5" secondAttribute="centerX" id="JgO-Fn-dHn"/>
<constraint firstAttribute="centerX" secondItem="zEq-FU-wV5" secondAttribute="centerX" id="qqM-NS-xev"/>
<constraint firstAttribute="centerY" secondItem="zEq-FU-wV5" secondAttribute="centerY" id="qzY-Ky-pLD"/>
</constraints>
</view>
<tabBarItem key="tabBarItem" title="Second" image="second" id="cPa-gy-q4n"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="4Nw-L8-lE0" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="709" y="-630"/>
<point key="canvasLocation" x="750" y="360"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="r7l-gg-dq7">
<!--Tab Bar Controller-->
<scene sceneID="yl2-sM-qoP">
<objects>
<navigationController id="vC3-pB-5Vb" sceneMemberID="viewController">
<navigationBar key="navigationBar" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" misplaced="YES" id="DjV-YW-jjY">
<rect key="frame" x="0.0" y="0.0" width="1000" height="1000"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<tabBarController id="49e-Tb-3d3" sceneMemberID="viewController">
<nil key="simulatedBottomBarMetrics"/>
<tabBar key="tabBar" contentMode="scaleToFill" id="W28-zg-YXA">
<rect key="frame" x="0.0" y="975" width="768" height="49"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
</tabBar>
<connections>
<segue destination="JEX-9P-axG" kind="relationship" relationship="rootViewController" id="GKi-kA-LjT"/>
<segue destination="9pv-A4-QxB" kind="relationship" relationship="viewControllers" id="u7Y-xg-7CH"/>
<segue destination="8rJ-Kc-sve" kind="relationship" relationship="viewControllers" id="lzU-1b-eKA"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="SLD-UC-DBI" userLabel="First Responder" sceneMemberID="firstResponder"/>
</tabBarController>
<placeholder placeholderIdentifier="IBFirstResponder" id="HuB-VB-40B" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-45" y="129"/>
<point key="canvasLocation" x="0.0" y="0.0"/>
</scene>
</scenes>
<inferredMetricsTieBreakers>
<segue reference="Tll-UG-LXB"/>
</inferredMetricsTieBreakers>
<resources>
<image name="first" width="30" height="30"/>
<image name="second" width="30" height="30"/>
</resources>
</document>

View File

@@ -1,45 +0,0 @@
//
// DetailViewController.swift
// Task Master
//
// Created by Alexander Davis on 17/11/2016.
// Copyright © 2016 Alexander Davis Computing and Media. All rights reserved.
//
import UIKit
class DetailViewController: UIViewController {
@IBOutlet weak var detailDescriptionLabel: UILabel!
func configureView() {
// Update the user interface for the detail item.
if let detail = self.detailItem {
if let label = self.detailDescriptionLabel {
label.text = detail.description
}
}
}
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
self.configureView()
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
var detailItem: NSDate? {
didSet {
// Update the view.
self.configureView()
}
}
}

View File

@@ -0,0 +1,25 @@
//
// FirstViewController.swift
// Task Master
//
// Created by Alexander Davis on 17/11/2016.
// Copyright © 2016 Alexander Davis Computing and Media. All rights reserved.
//
import UIKit
class FirstViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}

View File

@@ -1,94 +0,0 @@
//
// MasterViewController.swift
// Task Master
//
// Created by Alexander Davis on 17/11/2016.
// Copyright © 2016 Alexander Davis Computing and Media. All rights reserved.
//
import UIKit
class MasterViewController: UITableViewController {
var detailViewController: DetailViewController? = nil
var objects = [Any]()
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
self.navigationItem.leftBarButtonItem = self.editButtonItem
let addButton = UIBarButtonItem(barButtonSystemItem: .add, target: self, action: #selector(insertNewObject(_:)))
self.navigationItem.rightBarButtonItem = addButton
if let split = self.splitViewController {
let controllers = split.viewControllers
self.detailViewController = (controllers[controllers.count-1] as! UINavigationController).topViewController as? DetailViewController
}
}
override func viewWillAppear(_ animated: Bool) {
self.clearsSelectionOnViewWillAppear = self.splitViewController!.isCollapsed
super.viewWillAppear(animated)
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
func insertNewObject(_ sender: Any) {
objects.insert(NSDate(), at: 0)
let indexPath = IndexPath(row: 0, section: 0)
self.tableView.insertRows(at: [indexPath], with: .automatic)
}
// MARK: - Segues
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if segue.identifier == "showDetail" {
if let indexPath = self.tableView.indexPathForSelectedRow {
let object = objects[indexPath.row] as! NSDate
let controller = (segue.destination as! UINavigationController).topViewController as! DetailViewController
controller.detailItem = object
controller.navigationItem.leftBarButtonItem = self.splitViewController?.displayModeButtonItem
controller.navigationItem.leftItemsSupplementBackButton = true
}
}
}
// MARK: - Table View
override func numberOfSections(in tableView: UITableView) -> Int {
return 1
}
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return objects.count
}
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath)
let object = objects[indexPath.row] as! NSDate
cell.textLabel!.text = object.description
return cell
}
override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
// Return false if you do not want the specified item to be editable.
return true
}
override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) {
if editingStyle == .delete {
objects.remove(at: indexPath.row)
tableView.deleteRows(at: [indexPath], with: .fade)
} else if editingStyle == .insert {
// Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view.
}
}
}

View File

@@ -0,0 +1,25 @@
//
// SecondViewController.swift
// Task Master
//
// Created by Alexander Davis on 17/11/2016.
// Copyright © 2016 Alexander Davis Computing and Media. All rights reserved.
//
import UIKit
class SecondViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}