From 49063372cc8c01bbc7c66d632c3061e71a09f2ad Mon Sep 17 00:00:00 2001 From: AustinBCole Date: Wed, 12 Dec 2018 14:29:23 -0700 Subject: [PATCH 1/2] Add networking files. --- Detail/Detail.xcodeproj/project.pbxproj | 381 ++++++++++++++++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + Detail/Detail/AppDelegate.swift | 10 + .../AppIcon.appiconset/Contents.json | 98 +++++ Detail/Detail/Assets.xcassets/Contents.json | 6 + .../Detail/Base.lproj/LaunchScreen.storyboard | 25 ++ Detail/Detail/Base.lproj/Main.storyboard | 236 +++++++++++ Detail/Detail/DetailViewController.swift | 24 ++ Detail/Detail/EntryCell.swift | 18 + Detail/Detail/EntryCell.xib | 88 ++++ .../Detail/Firebase.swift | 2 +- .../Detail/FirebaseItem.swift | 0 Detail/Detail/Info.plist | 45 +++ Detail/Detail/Model.swift | 22 + Detail/Detail/ModelUpdateClient.swift | 5 + Detail/Detail/Person.swift | 10 + Detail/Detail/PersonCell.swift | 8 + Detail/Detail/PersonCell.xib | 53 +++ Detail/Detail/TableViewController.swift | 64 +++ 20 files changed, 1109 insertions(+), 1 deletion(-) create mode 100644 Detail/Detail.xcodeproj/project.pbxproj create mode 100644 Detail/Detail.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 Detail/Detail.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 Detail/Detail/AppDelegate.swift create mode 100644 Detail/Detail/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 Detail/Detail/Assets.xcassets/Contents.json create mode 100644 Detail/Detail/Base.lproj/LaunchScreen.storyboard create mode 100644 Detail/Detail/Base.lproj/Main.storyboard create mode 100644 Detail/Detail/DetailViewController.swift create mode 100644 Detail/Detail/EntryCell.swift create mode 100644 Detail/Detail/EntryCell.xib rename Firebase.swift => Detail/Detail/Firebase.swift (99%) rename FirebaseItem.swift => Detail/Detail/FirebaseItem.swift (100%) create mode 100644 Detail/Detail/Info.plist create mode 100644 Detail/Detail/Model.swift create mode 100644 Detail/Detail/ModelUpdateClient.swift create mode 100644 Detail/Detail/Person.swift create mode 100644 Detail/Detail/PersonCell.swift create mode 100644 Detail/Detail/PersonCell.xib create mode 100644 Detail/Detail/TableViewController.swift diff --git a/Detail/Detail.xcodeproj/project.pbxproj b/Detail/Detail.xcodeproj/project.pbxproj new file mode 100644 index 0000000..9a6d4cf --- /dev/null +++ b/Detail/Detail.xcodeproj/project.pbxproj @@ -0,0 +1,381 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + 8E4DE798219C9EB200AFE381 /* Model.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E4DE797219C9EB200AFE381 /* Model.swift */; }; + 8E4DE79A219C9F3800AFE381 /* Person.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E4DE799219C9F3800AFE381 /* Person.swift */; }; + 8E4DE79C219CA16500AFE381 /* TableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E4DE79B219CA16500AFE381 /* TableViewController.swift */; }; + 8E4DE79E219CAA7700AFE381 /* ModelUpdateClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E4DE79D219CAA7700AFE381 /* ModelUpdateClient.swift */; }; + 8E9AA977219C92880012896B /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E9AA976219C92880012896B /* AppDelegate.swift */; }; + 8E9AA97C219C92880012896B /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8E9AA97A219C92880012896B /* Main.storyboard */; }; + 8E9AA97E219C928B0012896B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8E9AA97D219C928B0012896B /* Assets.xcassets */; }; + 8E9AA981219C928B0012896B /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8E9AA97F219C928B0012896B /* LaunchScreen.storyboard */; }; + 8E9AA989219C92CB0012896B /* PersonCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E9AA988219C92CB0012896B /* PersonCell.swift */; }; + 8E9AA98B219C92D50012896B /* EntryCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E9AA98A219C92D50012896B /* EntryCell.swift */; }; + 8E9AA98D219C93100012896B /* PersonCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8E9AA98C219C93100012896B /* PersonCell.xib */; }; + 8E9AA98F219C93170012896B /* EntryCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8E9AA98E219C93170012896B /* EntryCell.xib */; }; + 8E9AA991219C9BDD0012896B /* DetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E9AA990219C9BDD0012896B /* DetailViewController.swift */; }; + A231D96D21C1B46F0098E553 /* FirebaseItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = A231D96B21C1B46F0098E553 /* FirebaseItem.swift */; }; + A231D96E21C1B46F0098E553 /* Firebase.swift in Sources */ = {isa = PBXBuildFile; fileRef = A231D96C21C1B46F0098E553 /* Firebase.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 8E4DE797219C9EB200AFE381 /* Model.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model.swift; sourceTree = ""; }; + 8E4DE799219C9F3800AFE381 /* Person.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Person.swift; sourceTree = ""; }; + 8E4DE79B219CA16500AFE381 /* TableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TableViewController.swift; sourceTree = ""; }; + 8E4DE79D219CAA7700AFE381 /* ModelUpdateClient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModelUpdateClient.swift; sourceTree = ""; }; + 8E9AA973219C92880012896B /* Detail.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Detail.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 8E9AA976219C92880012896B /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 8E9AA97B219C92880012896B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 8E9AA97D219C928B0012896B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 8E9AA980219C928B0012896B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 8E9AA982219C928B0012896B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 8E9AA988219C92CB0012896B /* PersonCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PersonCell.swift; sourceTree = ""; }; + 8E9AA98A219C92D50012896B /* EntryCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EntryCell.swift; sourceTree = ""; }; + 8E9AA98C219C93100012896B /* PersonCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PersonCell.xib; sourceTree = ""; }; + 8E9AA98E219C93170012896B /* EntryCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = EntryCell.xib; sourceTree = ""; }; + 8E9AA990219C9BDD0012896B /* DetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DetailViewController.swift; sourceTree = ""; }; + A231D96B21C1B46F0098E553 /* FirebaseItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FirebaseItem.swift; sourceTree = ""; }; + A231D96C21C1B46F0098E553 /* Firebase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Firebase.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8E9AA970219C92880012896B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 8E9AA96A219C92880012896B = { + isa = PBXGroup; + children = ( + 8E9AA975219C92880012896B /* Detail */, + 8E9AA974219C92880012896B /* Products */, + ); + sourceTree = ""; + }; + 8E9AA974219C92880012896B /* Products */ = { + isa = PBXGroup; + children = ( + 8E9AA973219C92880012896B /* Detail.app */, + ); + name = Products; + sourceTree = ""; + }; + 8E9AA975219C92880012896B /* Detail */ = { + isa = PBXGroup; + children = ( + 8E9AA976219C92880012896B /* AppDelegate.swift */, + 8E9AA988219C92CB0012896B /* PersonCell.swift */, + 8E9AA98C219C93100012896B /* PersonCell.xib */, + 8E9AA98A219C92D50012896B /* EntryCell.swift */, + 8E9AA98E219C93170012896B /* EntryCell.xib */, + 8E9AA990219C9BDD0012896B /* DetailViewController.swift */, + 8E4DE79B219CA16500AFE381 /* TableViewController.swift */, + A231D96C21C1B46F0098E553 /* Firebase.swift */, + A231D96B21C1B46F0098E553 /* FirebaseItem.swift */, + 8E4DE797219C9EB200AFE381 /* Model.swift */, + 8E4DE79D219CAA7700AFE381 /* ModelUpdateClient.swift */, + 8E4DE799219C9F3800AFE381 /* Person.swift */, + 8E9AA97A219C92880012896B /* Main.storyboard */, + 8E9AA97D219C928B0012896B /* Assets.xcassets */, + 8E9AA97F219C928B0012896B /* LaunchScreen.storyboard */, + 8E9AA982219C928B0012896B /* Info.plist */, + ); + path = Detail; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8E9AA972219C92880012896B /* Detail */ = { + isa = PBXNativeTarget; + buildConfigurationList = 8E9AA985219C928B0012896B /* Build configuration list for PBXNativeTarget "Detail" */; + buildPhases = ( + 8E9AA96F219C92880012896B /* Sources */, + 8E9AA970219C92880012896B /* Frameworks */, + 8E9AA971219C92880012896B /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Detail; + productName = Detail; + productReference = 8E9AA973219C92880012896B /* Detail.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 8E9AA96B219C92880012896B /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1010; + LastUpgradeCheck = 1010; + ORGANIZATIONNAME = "Erica Sadun"; + TargetAttributes = { + 8E9AA972219C92880012896B = { + CreatedOnToolsVersion = 10.1; + }; + }; + }; + buildConfigurationList = 8E9AA96E219C92880012896B /* Build configuration list for PBXProject "Detail" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 8E9AA96A219C92880012896B; + productRefGroup = 8E9AA974219C92880012896B /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 8E9AA972219C92880012896B /* Detail */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 8E9AA971219C92880012896B /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8E9AA981219C928B0012896B /* LaunchScreen.storyboard in Resources */, + 8E9AA97E219C928B0012896B /* Assets.xcassets in Resources */, + 8E9AA98F219C93170012896B /* EntryCell.xib in Resources */, + 8E9AA98D219C93100012896B /* PersonCell.xib in Resources */, + 8E9AA97C219C92880012896B /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8E9AA96F219C92880012896B /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A231D96E21C1B46F0098E553 /* Firebase.swift in Sources */, + 8E4DE79A219C9F3800AFE381 /* Person.swift in Sources */, + 8E4DE79C219CA16500AFE381 /* TableViewController.swift in Sources */, + 8E4DE798219C9EB200AFE381 /* Model.swift in Sources */, + A231D96D21C1B46F0098E553 /* FirebaseItem.swift in Sources */, + 8E9AA989219C92CB0012896B /* PersonCell.swift in Sources */, + 8E9AA98B219C92D50012896B /* EntryCell.swift in Sources */, + 8E4DE79E219CAA7700AFE381 /* ModelUpdateClient.swift in Sources */, + 8E9AA977219C92880012896B /* AppDelegate.swift in Sources */, + 8E9AA991219C9BDD0012896B /* DetailViewController.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 8E9AA97A219C92880012896B /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 8E9AA97B219C92880012896B /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 8E9AA97F219C928B0012896B /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 8E9AA980219C928B0012896B /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 8E9AA983219C928B0012896B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 11.4; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 8E9AA984219C928B0012896B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 11.4; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 8E9AA986219C928B0012896B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 2W4DVPEQ39; + INFOPLIST_FILE = Detail/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.sadun.Detail; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 8E9AA987219C928B0012896B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 2W4DVPEQ39; + INFOPLIST_FILE = Detail/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.sadun.Detail; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 8E9AA96E219C92880012896B /* Build configuration list for PBXProject "Detail" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 8E9AA983219C928B0012896B /* Debug */, + 8E9AA984219C928B0012896B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 8E9AA985219C928B0012896B /* Build configuration list for PBXNativeTarget "Detail" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 8E9AA986219C928B0012896B /* Debug */, + 8E9AA987219C928B0012896B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 8E9AA96B219C92880012896B /* Project object */; +} diff --git a/Detail/Detail.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Detail/Detail.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..50d85f8 --- /dev/null +++ b/Detail/Detail.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Detail/Detail.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Detail/Detail.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Detail/Detail.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Detail/Detail/AppDelegate.swift b/Detail/Detail/AppDelegate.swift new file mode 100644 index 0000000..31619e2 --- /dev/null +++ b/Detail/Detail/AppDelegate.swift @@ -0,0 +1,10 @@ +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + return true + } +} diff --git a/Detail/Detail/Assets.xcassets/AppIcon.appiconset/Contents.json b/Detail/Detail/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d8db8d6 --- /dev/null +++ b/Detail/Detail/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/Detail/Detail/Assets.xcassets/Contents.json b/Detail/Detail/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/Detail/Detail/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Detail/Detail/Base.lproj/LaunchScreen.storyboard b/Detail/Detail/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..bfa3612 --- /dev/null +++ b/Detail/Detail/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Detail/Detail/Base.lproj/Main.storyboard b/Detail/Detail/Base.lproj/Main.storyboard new file mode 100644 index 0000000..efdd8b3 --- /dev/null +++ b/Detail/Detail/Base.lproj/Main.storyboard @@ -0,0 +1,236 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Detail/Detail/DetailViewController.swift b/Detail/Detail/DetailViewController.swift new file mode 100644 index 0000000..996820f --- /dev/null +++ b/Detail/Detail/DetailViewController.swift @@ -0,0 +1,24 @@ +import UIKit + +class DetailViewController: UIViewController { + var person: Person? + + @IBOutlet weak var nameField: UITextField! + @IBOutlet weak var cohortField: UITextField! + + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + + guard let person = person else { return } + nameField.text = person.name + cohortField.text = person.cohort + } + + @IBAction func save(_ sender: Any) { + guard let person = person else { return } + guard let name = nameField.text, !name.isEmpty else { return } + person.name = name + person.cohort = cohortField.text ?? "" + navigationController?.popViewController(animated: true) + } +} diff --git a/Detail/Detail/EntryCell.swift b/Detail/Detail/EntryCell.swift new file mode 100644 index 0000000..f8b8d39 --- /dev/null +++ b/Detail/Detail/EntryCell.swift @@ -0,0 +1,18 @@ +import UIKit + +class EntryCell: UITableViewCell { + static let reuseIdentifier = "entry cell" + + @IBOutlet weak var nameField: UITextField! + + @IBOutlet weak var cohortField: UITextField! + + @IBAction func add(_ sender: Any) { + guard let name = nameField.text, !name.isEmpty else { return } + let cohort = cohortField.text ?? "" + let person = Person(name: name, cohort: cohort) + Model.shared.add(person: person) + nameField.text = nil + cohortField.text = nil + } +} diff --git a/Detail/Detail/EntryCell.xib b/Detail/Detail/EntryCell.xib new file mode 100644 index 0000000..52c04e8 --- /dev/null +++ b/Detail/Detail/EntryCell.xib @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Firebase.swift b/Detail/Detail/Firebase.swift similarity index 99% rename from Firebase.swift rename to Detail/Detail/Firebase.swift index d1f857c..93b7303 100644 --- a/Firebase.swift +++ b/Detail/Detail/Firebase.swift @@ -10,7 +10,7 @@ import Foundation class Firebase { - static var baseURL: URL! { return URL(string: "https://put-and-post.firebaseio.com/") } + static var baseURL: URL! { return URL(string: "https://put-and-post-d7612.firebaseio.com/") } static func requestURL(_ method: String, for recordIdentifier: String = "unknownid") -> URL { switch method { diff --git a/FirebaseItem.swift b/Detail/Detail/FirebaseItem.swift similarity index 100% rename from FirebaseItem.swift rename to Detail/Detail/FirebaseItem.swift diff --git a/Detail/Detail/Info.plist b/Detail/Detail/Info.plist new file mode 100644 index 0000000..16be3b6 --- /dev/null +++ b/Detail/Detail/Info.plist @@ -0,0 +1,45 @@ + + + + + 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 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/Detail/Detail/Model.swift b/Detail/Detail/Model.swift new file mode 100644 index 0000000..55fb185 --- /dev/null +++ b/Detail/Detail/Model.swift @@ -0,0 +1,22 @@ +import Foundation + +class Model { + static let shared = Model() + private init() {} + var delegate: ModelUpdateClient? + + private var persons: [Person] = [] + + func count() -> Int { + return persons.count + } + + func person(forIndex index: Int) -> Person { + return persons[index] + } + + func add(person: Person) { + persons.append(person) + delegate?.modelDidUpdate() + } +} diff --git a/Detail/Detail/ModelUpdateClient.swift b/Detail/Detail/ModelUpdateClient.swift new file mode 100644 index 0000000..6268cd4 --- /dev/null +++ b/Detail/Detail/ModelUpdateClient.swift @@ -0,0 +1,5 @@ +import Foundation + +protocol ModelUpdateClient { + func modelDidUpdate() +} diff --git a/Detail/Detail/Person.swift b/Detail/Detail/Person.swift new file mode 100644 index 0000000..ccf0dfc --- /dev/null +++ b/Detail/Detail/Person.swift @@ -0,0 +1,10 @@ +import Foundation + +class Person { + var name: String + var cohort: String + + init(name: String, cohort: String) { + (self.name, self.cohort) = (name, cohort) + } +} diff --git a/Detail/Detail/PersonCell.swift b/Detail/Detail/PersonCell.swift new file mode 100644 index 0000000..57762b0 --- /dev/null +++ b/Detail/Detail/PersonCell.swift @@ -0,0 +1,8 @@ +import UIKit + +class PersonCell: UITableViewCell { + static let reuseIdentifier = "person cell" + + @IBOutlet weak var nameLabel: UILabel! + @IBOutlet weak var cohortLabel: UILabel! +} diff --git a/Detail/Detail/PersonCell.xib b/Detail/Detail/PersonCell.xib new file mode 100644 index 0000000..c536c7c --- /dev/null +++ b/Detail/Detail/PersonCell.xib @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Detail/Detail/TableViewController.swift b/Detail/Detail/TableViewController.swift new file mode 100644 index 0000000..84a2ab5 --- /dev/null +++ b/Detail/Detail/TableViewController.swift @@ -0,0 +1,64 @@ +import UIKit + +class TableViewController: UITableViewController, ModelUpdateClient { + override func numberOfSections(in tableView: UITableView) -> Int { + return 2 + } + + override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + switch section { + case 0: + return 1 + case 1: + return Model.shared.count() + default: + fatalError("Illegal section") + } + } + + override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + if indexPath.section == 0 { + // handle the single entry cell + // return it + guard let cell = tableView.dequeueReusableCell(withIdentifier: EntryCell.reuseIdentifier, for: indexPath) as? EntryCell + else { fatalError("Unable to dequeue entry cell") } + + cell.nameField.text = "" // Coder paranoia + cell.cohortField.text = "" + + return cell + } + + // do anything related to person cell + guard let cell = tableView.dequeueReusableCell(withIdentifier: PersonCell.reuseIdentifier, for: indexPath) as? PersonCell + else { fatalError("Unable to dequeue person cell") } + + let person = Model.shared.person(forIndex: indexPath.row) + cell.nameLabel.text = person.name + cell.cohortLabel.text = person.cohort + return cell + } + + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + tableView.reloadData() + } + + override func viewDidLoad() { + super.viewDidLoad() + Model.shared.delegate = self + } + + func modelDidUpdate() { + tableView.reloadData() + } + + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + guard let indexPath = tableView.indexPathForSelectedRow + else { return } + guard let destination = segue.destination as? DetailViewController + else { return } + + destination.person = Model.shared.person(forIndex: indexPath.row) + } +} From 6189b0f3e2b22414bfe90d94cfe7f8a86906d7c9 Mon Sep 17 00:00:00 2001 From: AustinBCole Date: Wed, 12 Dec 2018 16:50:30 -0700 Subject: [PATCH 2/2] MVP --- Detail/Detail.xcodeproj/project.pbxproj | 16 +++++++------- Detail/Detail/DetailViewController.swift | 4 ++++ Detail/Detail/EntryCell.swift | 4 +++- Detail/Detail/Firebase.swift | 2 +- Detail/Detail/Model.swift | 28 ++++++++++++++++++++++-- Detail/Detail/Person.swift | 4 +++- Detail/Detail/TableViewController.swift | 17 ++++++++++++++ 7 files changed, 62 insertions(+), 13 deletions(-) diff --git a/Detail/Detail.xcodeproj/project.pbxproj b/Detail/Detail.xcodeproj/project.pbxproj index 9a6d4cf..255ade1 100644 --- a/Detail/Detail.xcodeproj/project.pbxproj +++ b/Detail/Detail.xcodeproj/project.pbxproj @@ -20,8 +20,8 @@ 8E9AA98D219C93100012896B /* PersonCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8E9AA98C219C93100012896B /* PersonCell.xib */; }; 8E9AA98F219C93170012896B /* EntryCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8E9AA98E219C93170012896B /* EntryCell.xib */; }; 8E9AA991219C9BDD0012896B /* DetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E9AA990219C9BDD0012896B /* DetailViewController.swift */; }; - A231D96D21C1B46F0098E553 /* FirebaseItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = A231D96B21C1B46F0098E553 /* FirebaseItem.swift */; }; - A231D96E21C1B46F0098E553 /* Firebase.swift in Sources */ = {isa = PBXBuildFile; fileRef = A231D96C21C1B46F0098E553 /* Firebase.swift */; }; + A2250C8D21C1CC5400CCC715 /* FirebaseItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2250C8B21C1CC5400CCC715 /* FirebaseItem.swift */; }; + A2250C8E21C1CC5400CCC715 /* Firebase.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2250C8C21C1CC5400CCC715 /* Firebase.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -40,8 +40,8 @@ 8E9AA98C219C93100012896B /* PersonCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PersonCell.xib; sourceTree = ""; }; 8E9AA98E219C93170012896B /* EntryCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = EntryCell.xib; sourceTree = ""; }; 8E9AA990219C9BDD0012896B /* DetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DetailViewController.swift; sourceTree = ""; }; - A231D96B21C1B46F0098E553 /* FirebaseItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FirebaseItem.swift; sourceTree = ""; }; - A231D96C21C1B46F0098E553 /* Firebase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Firebase.swift; sourceTree = ""; }; + A2250C8B21C1CC5400CCC715 /* FirebaseItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = FirebaseItem.swift; path = ../../../Devices/Devices/FirebaseItem.swift; sourceTree = ""; }; + A2250C8C21C1CC5400CCC715 /* Firebase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Firebase.swift; path = ../../../Devices/Devices/Firebase.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -81,9 +81,9 @@ 8E9AA98E219C93170012896B /* EntryCell.xib */, 8E9AA990219C9BDD0012896B /* DetailViewController.swift */, 8E4DE79B219CA16500AFE381 /* TableViewController.swift */, - A231D96C21C1B46F0098E553 /* Firebase.swift */, - A231D96B21C1B46F0098E553 /* FirebaseItem.swift */, 8E4DE797219C9EB200AFE381 /* Model.swift */, + A2250C8C21C1CC5400CCC715 /* Firebase.swift */, + A2250C8B21C1CC5400CCC715 /* FirebaseItem.swift */, 8E4DE79D219CAA7700AFE381 /* ModelUpdateClient.swift */, 8E4DE799219C9F3800AFE381 /* Person.swift */, 8E9AA97A219C92880012896B /* Main.storyboard */, @@ -167,11 +167,11 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - A231D96E21C1B46F0098E553 /* Firebase.swift in Sources */, + A2250C8E21C1CC5400CCC715 /* Firebase.swift in Sources */, 8E4DE79A219C9F3800AFE381 /* Person.swift in Sources */, 8E4DE79C219CA16500AFE381 /* TableViewController.swift in Sources */, 8E4DE798219C9EB200AFE381 /* Model.swift in Sources */, - A231D96D21C1B46F0098E553 /* FirebaseItem.swift in Sources */, + A2250C8D21C1CC5400CCC715 /* FirebaseItem.swift in Sources */, 8E9AA989219C92CB0012896B /* PersonCell.swift in Sources */, 8E9AA98B219C92D50012896B /* EntryCell.swift in Sources */, 8E4DE79E219CAA7700AFE381 /* ModelUpdateClient.swift in Sources */, diff --git a/Detail/Detail/DetailViewController.swift b/Detail/Detail/DetailViewController.swift index 996820f..70dc3b8 100644 --- a/Detail/Detail/DetailViewController.swift +++ b/Detail/Detail/DetailViewController.swift @@ -2,6 +2,7 @@ import UIKit class DetailViewController: UIViewController { var person: Person? + var indexPath: IndexPath? @IBOutlet weak var nameField: UITextField! @IBOutlet weak var cohortField: UITextField! @@ -20,5 +21,8 @@ class DetailViewController: UIViewController { person.name = name person.cohort = cohortField.text ?? "" navigationController?.popViewController(animated: true) + Model.shared.updatePerson(at: indexPath!) { + return + } } } diff --git a/Detail/Detail/EntryCell.swift b/Detail/Detail/EntryCell.swift index f8b8d39..48291dc 100644 --- a/Detail/Detail/EntryCell.swift +++ b/Detail/Detail/EntryCell.swift @@ -11,7 +11,9 @@ class EntryCell: UITableViewCell { guard let name = nameField.text, !name.isEmpty else { return } let cohort = cohortField.text ?? "" let person = Person(name: name, cohort: cohort) - Model.shared.add(person: person) + Model.shared.add(person: person) { + return + } nameField.text = nil cohortField.text = nil } diff --git a/Detail/Detail/Firebase.swift b/Detail/Detail/Firebase.swift index 93b7303..3e669f4 100644 --- a/Detail/Detail/Firebase.swift +++ b/Detail/Detail/Firebase.swift @@ -120,7 +120,7 @@ class Firebase { static func fetchRecords(completion: @escaping ([Item]?) -> Void) { let requestURL = baseURL.appendingPathExtension("json") let dataTask = URLSession.shared.dataTask(with: requestURL) { data, _, error in - + guard error == nil, let data = data else { // Guaranteed to work if let error = error { diff --git a/Detail/Detail/Model.swift b/Detail/Detail/Model.swift index 55fb185..f4bb4e5 100644 --- a/Detail/Detail/Model.swift +++ b/Detail/Detail/Model.swift @@ -5,7 +5,7 @@ class Model { private init() {} var delegate: ModelUpdateClient? - private var persons: [Person] = [] + var persons: [Person] = [] func count() -> Int { return persons.count @@ -15,8 +15,32 @@ class Model { return persons[index] } - func add(person: Person) { + func add(person: Person, with completion: @escaping () -> Void) { persons.append(person) delegate?.modelDidUpdate() + Firebase.save(item: person) { _ in + DispatchQueue.main.async { + completion() + } + } } + + func removePerson(indexPath: IndexPath, completion: @escaping () -> Void) { + let person = persons.remove(at: indexPath.row) + Firebase.delete(item: person) { _ in + DispatchQueue.main.async { + completion() + } + } + } + + func updatePerson(at indexPath: IndexPath, with completion: @escaping () -> Void) { + let person = persons[indexPath.row] + Firebase.save(item: person) { _ in + DispatchQueue.main.async { + completion() + } + } + } + } diff --git a/Detail/Detail/Person.swift b/Detail/Detail/Person.swift index ccf0dfc..4f11be6 100644 --- a/Detail/Detail/Person.swift +++ b/Detail/Detail/Person.swift @@ -1,6 +1,8 @@ import Foundation -class Person { +class Person: Codable, FirebaseItem { + var recordIdentifier: String = "" + var name: String var cohort: String diff --git a/Detail/Detail/TableViewController.swift b/Detail/Detail/TableViewController.swift index 84a2ab5..359f3b7 100644 --- a/Detail/Detail/TableViewController.swift +++ b/Detail/Detail/TableViewController.swift @@ -39,6 +39,14 @@ class TableViewController: UITableViewController, ModelUpdateClient { return cell } + override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) { + guard editingStyle == .delete else {return} + + Model.shared.removePerson(indexPath: indexPath) { + tableView.reloadData() + } + } + override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) tableView.reloadData() @@ -47,6 +55,14 @@ class TableViewController: UITableViewController, ModelUpdateClient { override func viewDidLoad() { super.viewDidLoad() Model.shared.delegate = self + Firebase.fetchRecords { persons in + if let persons = persons { + Model.shared.persons = persons + DispatchQueue.main.async { + self.tableView.reloadData() + } + } + } } func modelDidUpdate() { @@ -60,5 +76,6 @@ class TableViewController: UITableViewController, ModelUpdateClient { else { return } destination.person = Model.shared.person(forIndex: indexPath.row) + destination.indexPath = indexPath } }