diff --git a/Example.playground/Pages/Collection View.xcplaygroundpage/timeline.xctimeline b/Example.playground/Pages/Collection View.xcplaygroundpage/timeline.xctimeline
deleted file mode 100644
index bf468af..0000000
--- a/Example.playground/Pages/Collection View.xcplaygroundpage/timeline.xctimeline
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
diff --git a/Example.playground/Pages/Table View.xcplaygroundpage/timeline.xctimeline b/Example.playground/Pages/Table View.xcplaygroundpage/timeline.xctimeline
deleted file mode 100644
index bf468af..0000000
--- a/Example.playground/Pages/Table View.xcplaygroundpage/timeline.xctimeline
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
diff --git a/Example.playground/contents.xcplayground b/Example.playground/contents.xcplayground
deleted file mode 100644
index 08b64fe..0000000
--- a/Example.playground/contents.xcplayground
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/FunctionalTableData.xcodeproj/project.pbxproj b/FunctionalTableData.xcodeproj/project.pbxproj
index 3753747..4c59e13 100644
--- a/FunctionalTableData.xcodeproj/project.pbxproj
+++ b/FunctionalTableData.xcodeproj/project.pbxproj
@@ -7,6 +7,15 @@
objects = {
/* Begin PBXBuildFile section */
+ 17E57FE9208A404700BFCC3D /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17E57FE8208A404700BFCC3D /* AppDelegate.swift */; };
+ 17E57FEB208A404700BFCC3D /* TableExampleController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17E57FEA208A404700BFCC3D /* TableExampleController.swift */; };
+ 17E57FED208A404700BFCC3D /* CollectionExampleController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17E57FEC208A404700BFCC3D /* CollectionExampleController.swift */; };
+ 17E57FF0208A404700BFCC3D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 17E57FEE208A404700BFCC3D /* Main.storyboard */; };
+ 17E57FF2208A404800BFCC3D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 17E57FF1208A404800BFCC3D /* Assets.xcassets */; };
+ 17E57FF5208A404800BFCC3D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 17E57FF3208A404800BFCC3D /* LaunchScreen.storyboard */; };
+ 17E57FFA208A415900BFCC3D /* FunctionalTableData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C7A26FC1F2FA0F800360E9B /* FunctionalTableData.framework */; };
+ 17E57FFB208A415900BFCC3D /* FunctionalTableData.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4C7A26FC1F2FA0F800360E9B /* FunctionalTableData.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
+ 17E58000208A425F00BFCC3D /* LabelCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17E57FFF208A425F00BFCC3D /* LabelCell.swift */; };
4C63250B1F8AA89B00B2B74B /* TableCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CCCE8441F8AA7CD00C73258 /* TableCell.swift */; };
4C63250C1F8AA89D00B2B74B /* TableItemConfigType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CCCE8451F8AA7CD00C73258 /* TableItemConfigType.swift */; };
4C63250D1F8AA8A000B2B74B /* UITableView+Reusable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CCCE8461F8AA7CD00C73258 /* UITableView+Reusable.swift */; };
@@ -37,6 +46,13 @@
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
+ 17E57FFC208A415900BFCC3D /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 4C7A26F31F2FA0F800360E9B /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 4C7A26FB1F2FA0F800360E9B;
+ remoteInfo = FunctionalTableData;
+ };
4C7A27071F2FA0F800360E9B /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 4C7A26F31F2FA0F800360E9B /* Project object */;
@@ -46,8 +62,30 @@
};
/* End PBXContainerItemProxy section */
+/* Begin PBXCopyFilesBuildPhase section */
+ 17E57FFE208A415900BFCC3D /* Embed Frameworks */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = "";
+ dstSubfolderSpec = 10;
+ files = (
+ 17E57FFB208A415900BFCC3D /* FunctionalTableData.framework in Embed Frameworks */,
+ );
+ name = "Embed Frameworks";
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXCopyFilesBuildPhase section */
+
/* Begin PBXFileReference section */
- 4C30E4071FA029FE00337415 /* Example.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; path = Example.playground; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
+ 17E57FE6208A404700BFCC3D /* FunctionalTableDataDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FunctionalTableDataDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 17E57FE8208A404700BFCC3D /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
+ 17E57FEA208A404700BFCC3D /* TableExampleController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TableExampleController.swift; sourceTree = ""; };
+ 17E57FEC208A404700BFCC3D /* CollectionExampleController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CollectionExampleController.swift; sourceTree = ""; };
+ 17E57FEF208A404700BFCC3D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
+ 17E57FF1208A404800BFCC3D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
+ 17E57FF4208A404800BFCC3D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
+ 17E57FF6208A404800BFCC3D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
+ 17E57FFF208A425F00BFCC3D /* LabelCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LabelCell.swift; sourceTree = ""; };
4C7A26FC1F2FA0F800360E9B /* FunctionalTableData.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = FunctionalTableData.framework; sourceTree = BUILT_PRODUCTS_DIR; };
4C7A26FF1F2FA0F800360E9B /* FunctionalTableData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FunctionalTableData.h; sourceTree = ""; };
4C7A27001F2FA0F800360E9B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
@@ -81,6 +119,14 @@
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
+ 17E57FE3208A404700BFCC3D /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 17E57FFA208A415900BFCC3D /* FunctionalTableData.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
4C7A26F81F2FA0F800360E9B /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
@@ -99,12 +145,27 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
+ 17E57FE7208A404700BFCC3D /* FunctionalTableDataDemo */ = {
+ isa = PBXGroup;
+ children = (
+ 17E57FFF208A425F00BFCC3D /* LabelCell.swift */,
+ 17E57FE8208A404700BFCC3D /* AppDelegate.swift */,
+ 17E57FEA208A404700BFCC3D /* TableExampleController.swift */,
+ 17E57FEC208A404700BFCC3D /* CollectionExampleController.swift */,
+ 17E57FEE208A404700BFCC3D /* Main.storyboard */,
+ 17E57FF1208A404800BFCC3D /* Assets.xcassets */,
+ 17E57FF3208A404800BFCC3D /* LaunchScreen.storyboard */,
+ 17E57FF6208A404800BFCC3D /* Info.plist */,
+ );
+ path = FunctionalTableDataDemo;
+ sourceTree = "";
+ };
4C7A26F21F2FA0F800360E9B = {
isa = PBXGroup;
children = (
- 4C30E4071FA029FE00337415 /* Example.playground */,
4C7A26FE1F2FA0F800360E9B /* FunctionalTableData */,
4C7A27091F2FA0F800360E9B /* FunctionalTableDataTests */,
+ 17E57FE7208A404700BFCC3D /* FunctionalTableDataDemo */,
4C7A26FD1F2FA0F800360E9B /* Products */,
);
sourceTree = "";
@@ -114,6 +175,7 @@
children = (
4C7A26FC1F2FA0F800360E9B /* FunctionalTableData.framework */,
4C7A27051F2FA0F800360E9B /* FunctionalTableDataTests.xctest */,
+ 17E57FE6208A404700BFCC3D /* FunctionalTableDataDemo.app */,
);
name = Products;
sourceTree = "";
@@ -206,6 +268,25 @@
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
+ 17E57FE5208A404700BFCC3D /* FunctionalTableDataDemo */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 17E57FF9208A404800BFCC3D /* Build configuration list for PBXNativeTarget "FunctionalTableDataDemo" */;
+ buildPhases = (
+ 17E57FE2208A404700BFCC3D /* Sources */,
+ 17E57FE3208A404700BFCC3D /* Frameworks */,
+ 17E57FE4208A404700BFCC3D /* Resources */,
+ 17E57FFE208A415900BFCC3D /* Embed Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 17E57FFD208A415900BFCC3D /* PBXTargetDependency */,
+ );
+ name = FunctionalTableDataDemo;
+ productName = FunctionalTableDataDemo;
+ productReference = 17E57FE6208A404700BFCC3D /* FunctionalTableDataDemo.app */;
+ productType = "com.apple.product-type.application";
+ };
4C7A26FB1F2FA0F800360E9B /* FunctionalTableData */ = {
isa = PBXNativeTarget;
buildConfigurationList = 4C7A27101F2FA0F800360E9B /* Build configuration list for PBXNativeTarget "FunctionalTableData" */;
@@ -248,12 +329,18 @@
4C7A26F31F2FA0F800360E9B /* Project object */ = {
isa = PBXProject;
attributes = {
- LastSwiftUpdateCheck = 0830;
+ LastSwiftUpdateCheck = 0930;
LastUpgradeCheck = 0930;
ORGANIZATIONNAME = Shopify;
TargetAttributes = {
+ 17E57FE5208A404700BFCC3D = {
+ CreatedOnToolsVersion = 9.3;
+ DevelopmentTeam = UD42KN75C7;
+ ProvisioningStyle = Automatic;
+ };
4C7A26FB1F2FA0F800360E9B = {
CreatedOnToolsVersion = 8.3.3;
+ DevelopmentTeam = UD42KN75C7;
LastSwiftMigration = 0900;
ProvisioningStyle = Automatic;
};
@@ -279,11 +366,22 @@
targets = (
4C7A26FB1F2FA0F800360E9B /* FunctionalTableData */,
4C7A27041F2FA0F800360E9B /* FunctionalTableDataTests */,
+ 17E57FE5208A404700BFCC3D /* FunctionalTableDataDemo */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
+ 17E57FE4208A404700BFCC3D /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 17E57FF5208A404800BFCC3D /* LaunchScreen.storyboard in Resources */,
+ 17E57FF2208A404800BFCC3D /* Assets.xcassets in Resources */,
+ 17E57FF0208A404700BFCC3D /* Main.storyboard in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
4C7A26FA1F2FA0F800360E9B /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
@@ -301,6 +399,17 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
+ 17E57FE2208A404700BFCC3D /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 17E57FED208A404700BFCC3D /* CollectionExampleController.swift in Sources */,
+ 17E57FE9208A404700BFCC3D /* AppDelegate.swift in Sources */,
+ 17E58000208A425F00BFCC3D /* LabelCell.swift in Sources */,
+ 17E57FEB208A404700BFCC3D /* TableExampleController.swift in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
4C7A26F71F2FA0F800360E9B /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
@@ -343,6 +452,11 @@
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
+ 17E57FFD208A415900BFCC3D /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 4C7A26FB1F2FA0F800360E9B /* FunctionalTableData */;
+ targetProxy = 17E57FFC208A415900BFCC3D /* PBXContainerItemProxy */;
+ };
4C7A27081F2FA0F800360E9B /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 4C7A26FB1F2FA0F800360E9B /* FunctionalTableData */;
@@ -350,7 +464,70 @@
};
/* End PBXTargetDependency section */
+/* Begin PBXVariantGroup section */
+ 17E57FEE208A404700BFCC3D /* Main.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 17E57FEF208A404700BFCC3D /* Base */,
+ );
+ name = Main.storyboard;
+ sourceTree = "";
+ };
+ 17E57FF3208A404800BFCC3D /* LaunchScreen.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 17E57FF4208A404800BFCC3D /* Base */,
+ );
+ name = LaunchScreen.storyboard;
+ sourceTree = "";
+ };
+/* End PBXVariantGroup section */
+
/* Begin XCBuildConfiguration section */
+ 17E57FF7208A404800BFCC3D /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
+ CLANG_ENABLE_OBJC_WEAK = YES;
+ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+ CODE_SIGN_IDENTITY = "iPhone Developer";
+ CODE_SIGN_STYLE = Automatic;
+ DEVELOPMENT_TEAM = UD42KN75C7;
+ GCC_C_LANGUAGE_STANDARD = gnu11;
+ INFOPLIST_FILE = FunctionalTableDataDemo/Info.plist;
+ IPHONEOS_DEPLOYMENT_TARGET = 11.3;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = com.jadedpixel.FunctionalTableDataDemo;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_VERSION = 4.0;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Debug;
+ };
+ 17E57FF8208A404800BFCC3D /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
+ CLANG_ENABLE_OBJC_WEAK = YES;
+ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+ CODE_SIGN_IDENTITY = "iPhone Developer";
+ CODE_SIGN_STYLE = Automatic;
+ DEVELOPMENT_TEAM = UD42KN75C7;
+ GCC_C_LANGUAGE_STANDARD = gnu11;
+ INFOPLIST_FILE = FunctionalTableDataDemo/Info.plist;
+ IPHONEOS_DEPLOYMENT_TARGET = 11.3;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = com.jadedpixel.FunctionalTableDataDemo;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_VERSION = 4.0;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Release;
+ };
4C7A270E1F2FA0F800360E9B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
@@ -473,9 +650,9 @@
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_ENABLE_MODULES = YES;
- CODE_SIGN_IDENTITY = "";
+ CODE_SIGN_IDENTITY = "iPhone Developer";
DEFINES_MODULE = YES;
- DEVELOPMENT_TEAM = "";
+ DEVELOPMENT_TEAM = UD42KN75C7;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
@@ -495,9 +672,9 @@
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_ENABLE_MODULES = YES;
- CODE_SIGN_IDENTITY = "";
+ CODE_SIGN_IDENTITY = "iPhone Developer";
DEFINES_MODULE = YES;
- DEVELOPMENT_TEAM = "";
+ DEVELOPMENT_TEAM = UD42KN75C7;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
@@ -540,6 +717,15 @@
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
+ 17E57FF9208A404800BFCC3D /* Build configuration list for PBXNativeTarget "FunctionalTableDataDemo" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 17E57FF7208A404800BFCC3D /* Debug */,
+ 17E57FF8208A404800BFCC3D /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
4C7A26F61F2FA0F800360E9B /* Build configuration list for PBXProject "FunctionalTableData" */ = {
isa = XCConfigurationList;
buildConfigurations = (
diff --git a/FunctionalTableDataDemo/AppDelegate.swift b/FunctionalTableDataDemo/AppDelegate.swift
new file mode 100644
index 0000000..cb596af
--- /dev/null
+++ b/FunctionalTableDataDemo/AppDelegate.swift
@@ -0,0 +1,20 @@
+//
+// AppDelegate.swift
+// FunctionalTableDataDemo
+//
+// Created by Kevin Barnes on 2018-04-20.
+// Copyright © 2018 Shopify. All rights reserved.
+//
+
+import UIKit
+
+@UIApplicationMain
+class AppDelegate: UIResponder, UIApplicationDelegate {
+
+ var window: UIWindow?
+
+ func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
+ return true
+ }
+
+}
diff --git a/FunctionalTableDataDemo/Assets.xcassets/AppIcon.appiconset/Contents.json b/FunctionalTableDataDemo/Assets.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 0000000..d8db8d6
--- /dev/null
+++ b/FunctionalTableDataDemo/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,98 @@
+{
+ "images" : [
+ {
+ "idiom" : "iphone",
+ "size" : "20x20",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "20x20",
+ "scale" : "3x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "29x29",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "29x29",
+ "scale" : "3x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "40x40",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "40x40",
+ "scale" : "3x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "60x60",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "60x60",
+ "scale" : "3x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "20x20",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "20x20",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "29x29",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "29x29",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "40x40",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "40x40",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "76x76",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "76x76",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "83.5x83.5",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "ios-marketing",
+ "size" : "1024x1024",
+ "scale" : "1x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/FunctionalTableDataDemo/Assets.xcassets/Contents.json b/FunctionalTableDataDemo/Assets.xcassets/Contents.json
new file mode 100644
index 0000000..da4a164
--- /dev/null
+++ b/FunctionalTableDataDemo/Assets.xcassets/Contents.json
@@ -0,0 +1,6 @@
+{
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/FunctionalTableDataDemo/Assets.xcassets/collection.imageset/Contents.json b/FunctionalTableDataDemo/Assets.xcassets/collection.imageset/Contents.json
new file mode 100644
index 0000000..2a99787
--- /dev/null
+++ b/FunctionalTableDataDemo/Assets.xcassets/collection.imageset/Contents.json
@@ -0,0 +1,15 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "keypad.pdf"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ },
+ "properties" : {
+ "template-rendering-intent" : "template"
+ }
+}
\ No newline at end of file
diff --git a/FunctionalTableDataDemo/Assets.xcassets/collection.imageset/keypad.pdf b/FunctionalTableDataDemo/Assets.xcassets/collection.imageset/keypad.pdf
new file mode 100644
index 0000000..d873131
Binary files /dev/null and b/FunctionalTableDataDemo/Assets.xcassets/collection.imageset/keypad.pdf differ
diff --git a/FunctionalTableDataDemo/Assets.xcassets/table.imageset/Contents.json b/FunctionalTableDataDemo/Assets.xcassets/table.imageset/Contents.json
new file mode 100644
index 0000000..a68667d
--- /dev/null
+++ b/FunctionalTableDataDemo/Assets.xcassets/table.imageset/Contents.json
@@ -0,0 +1,15 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "list.pdf"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ },
+ "properties" : {
+ "template-rendering-intent" : "template"
+ }
+}
\ No newline at end of file
diff --git a/FunctionalTableDataDemo/Assets.xcassets/table.imageset/list.pdf b/FunctionalTableDataDemo/Assets.xcassets/table.imageset/list.pdf
new file mode 100644
index 0000000..4c85ee7
Binary files /dev/null and b/FunctionalTableDataDemo/Assets.xcassets/table.imageset/list.pdf differ
diff --git a/FunctionalTableDataDemo/Base.lproj/LaunchScreen.storyboard b/FunctionalTableDataDemo/Base.lproj/LaunchScreen.storyboard
new file mode 100644
index 0000000..f83f6fd
--- /dev/null
+++ b/FunctionalTableDataDemo/Base.lproj/LaunchScreen.storyboard
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/FunctionalTableDataDemo/Base.lproj/Main.storyboard b/FunctionalTableDataDemo/Base.lproj/Main.storyboard
new file mode 100644
index 0000000..ac47692
--- /dev/null
+++ b/FunctionalTableDataDemo/Base.lproj/Main.storyboard
@@ -0,0 +1,137 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Example.playground/Pages/Collection View.xcplaygroundpage/Contents.swift b/FunctionalTableDataDemo/CollectionExampleController.swift
similarity index 60%
rename from Example.playground/Pages/Collection View.xcplaygroundpage/Contents.swift
rename to FunctionalTableDataDemo/CollectionExampleController.swift
index b915196..5e0288e 100644
--- a/Example.playground/Pages/Collection View.xcplaygroundpage/Contents.swift
+++ b/FunctionalTableDataDemo/CollectionExampleController.swift
@@ -1,8 +1,15 @@
+//
+// SecondViewController.swift
+// FunctionalTableDataDemo
+//
+// Created by Kevin Barnes on 2018-04-20.
+// Copyright © 2018 Shopify. All rights reserved.
+//
+
import UIKit
-import PlaygroundSupport
import FunctionalTableData
-class ExampleViewController: UICollectionViewController {
+class CollectionExampleController: UICollectionViewController {
private let functionalData = FunctionalCollectionData()
private var items: [String] = [] {
didSet {
@@ -15,7 +22,7 @@ class ExampleViewController: UICollectionViewController {
collectionView?.backgroundColor = .white
functionalData.collectionView = collectionView
- title = "Example"
+ title = "Collection View"
navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .add, target: self, action: #selector(didSelectAdd))
}
@@ -37,12 +44,3 @@ class ExampleViewController: UICollectionViewController {
])
}
}
-
-// Create a layout, this is the key part when dealing with UICollectionView.
-let layout = UICollectionViewFlowLayout()
-layout.estimatedItemSize = UICollectionViewFlowLayoutAutomaticSize
-
-// Present the view controller in the Live View window
-let liveController = UINavigationController(rootViewController: ExampleViewController(collectionViewLayout: layout))
-liveController.preferredContentSize = CGSize(width: 320, height: 420)
-PlaygroundPage.current.liveView = liveController
diff --git a/FunctionalTableDataDemo/Info.plist b/FunctionalTableDataDemo/Info.plist
new file mode 100644
index 0000000..6873106
--- /dev/null
+++ b/FunctionalTableDataDemo/Info.plist
@@ -0,0 +1,55 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ $(DEVELOPMENT_LANGUAGE)
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ $(PRODUCT_NAME)
+ CFBundlePackageType
+ APPL
+ CFBundleShortVersionString
+ 1.0
+ CFBundleVersion
+ 1
+ LSRequiresIPhoneOS
+
+ UILaunchStoryboardName
+ LaunchScreen
+ UIMainStoryboardFile
+ Main
+ UIRequiredDeviceCapabilities
+
+ armv7
+
+ UIStatusBarTintParameters
+
+ UINavigationBar
+
+ Style
+ UIBarStyleDefault
+ Translucent
+
+
+
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+
+
diff --git a/Example.playground/Sources/LabelCell.swift b/FunctionalTableDataDemo/LabelCell.swift
similarity index 100%
rename from Example.playground/Sources/LabelCell.swift
rename to FunctionalTableDataDemo/LabelCell.swift
diff --git a/Example.playground/Pages/Table View.xcplaygroundpage/Contents.swift b/FunctionalTableDataDemo/TableExampleController.swift
similarity index 67%
rename from Example.playground/Pages/Table View.xcplaygroundpage/Contents.swift
rename to FunctionalTableDataDemo/TableExampleController.swift
index cf083ba..26a5001 100644
--- a/Example.playground/Pages/Table View.xcplaygroundpage/Contents.swift
+++ b/FunctionalTableDataDemo/TableExampleController.swift
@@ -1,8 +1,16 @@
+//
+// FirstViewController.swift
+// FunctionalTableDataDemo
+//
+// Created by Kevin Barnes on 2018-04-20.
+// Copyright © 2018 Shopify. All rights reserved.
+//
+
import UIKit
-import PlaygroundSupport
import FunctionalTableData
-class ExampleViewController: UITableViewController {
+class TableExampleController: UITableViewController {
+
private let functionalData = FunctionalTableData()
private var items: [String] = [] {
didSet {
@@ -14,7 +22,7 @@ class ExampleViewController: UITableViewController {
super.viewDidLoad()
functionalData.tableView = tableView
- title = "Example"
+ title = "Table View"
navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .add, target: self, action: #selector(didSelectAdd))
}
@@ -32,11 +40,8 @@ class ExampleViewController: UITableViewController {
functionalData.renderAndDiff([
TableSection(key: "section", rows: rows)
- ])
+ ])
}
+
}
-// Present the view controller in the Live View window
-let liveController = UINavigationController(rootViewController: ExampleViewController())
-liveController.preferredContentSize = CGSize(width: 320, height: 420)
-PlaygroundPage.current.liveView = liveController
diff --git a/README.md b/README.md
index ba280fc..4b7e098 100644
--- a/README.md
+++ b/README.md
@@ -36,7 +36,7 @@ To use the Functional Table Data (FTD) two things are required, one instance of
## Usage
-Check out the [example playground](/Example.playground) for a fully interactive example.
+Check out the [demo app](/FunctionalTableDataDemo) for a fully interactive example.
Any time you want to update the data currently being displayed you generate the new state and pass it off to your instance of the Functional Table Data. The FTD is then responsible for computing the differences between the previous state and the next state and updating itself as necessary.
@@ -74,7 +74,7 @@ functionalTableData.renderAndDiff([section])
-Check out the [example playground](/Example.playground) for a fully interactive example.
+Check out the [demo app](/FunctionalTableDataDemo) for a fully interactive example.
### Building new Cells
Knowing that a cell consists of a view and state let's start with a simple example, a cell that displays a label. By specifying the generic requirements of `HostCell`, the simplest possible example is one that takes an `UILabel` as its view, a `String` as its state and `LayoutMarginsTableItemLayout` as the layout (See `TableItemLayout` for more info).