diff --git a/.travis.yml b/.travis.yml index 5ab5d3a..044f65c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,15 +2,14 @@ # * http://www.objc.io/issue-6/travis-ci.html # * https://github.com/supermarin/xcpretty#usage -osx_image: xcode10 +osx_image: xcode10.2 language: objective-c env: - DESTINATION='platform=iOS Simulator,name=iPhone 6S,OS=9.3' - DESTINATION='platform=iOS Simulator,name=iPhone 7,OS=10.3.1' - DESTINATION='platform=iOS Simulator,name=iPhone 8,OS=11.4' - - DESTINATION='platform=iOS Simulator,name=iPhone X,OS=11.4' - - DESTINATION='platform=iOS Simulator,name=iPhone X,OS=12.0' + - DESTINATION='platform=iOS Simulator,name=iPhone XS,OS=12.2' script: - set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/TableViewLiaison.xcworkspace -scheme TableViewLiaison-Example -destination "$DESTINATION" | xcpretty diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 4febdfe..ae3ae34 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,5 +1,5 @@ PODS: - - TableViewLiaison (1.0.2) + - TableViewLiaison (1.0.3) DEPENDENCIES: - TableViewLiaison (from `../`) @@ -9,7 +9,7 @@ EXTERNAL SOURCES: :path: "../" SPEC CHECKSUMS: - TableViewLiaison: 4de1af852d939db0ba4d892ad760a0d346ec5a60 + TableViewLiaison: c48125074fa532bd852f1f4cd1bafd1c9325f184 PODFILE CHECKSUM: f818d085ecc094e9577389f3dd62126b0c67c6c6 diff --git a/Example/Pods/Local Podspecs/TableViewLiaison.podspec.json b/Example/Pods/Local Podspecs/TableViewLiaison.podspec.json index e059c6a..000d277 100644 --- a/Example/Pods/Local Podspecs/TableViewLiaison.podspec.json +++ b/Example/Pods/Local Podspecs/TableViewLiaison.podspec.json @@ -1,6 +1,6 @@ { "name": "TableViewLiaison", - "version": "1.0.2", + "version": "1.0.3", "summary": "Framework to help you better manage UITableViews.", "description": "TableViewLiaison abstracts and simplifies UITableView construction and management.", "homepage": "https://github.com/dylanshine/TableViewLiaison", @@ -13,11 +13,11 @@ }, "source": { "git": "https://github.com/dylanshine/TableViewLiaison.git", - "tag": "1.0.2" + "tag": "1.0.3" }, "platforms": { "ios": "9.0" }, "source_files": "TableViewLiaison/Classes/**/*", - "swift_version": "4.2" + "swift_version": "5.0" } diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock index 4febdfe..ae3ae34 100644 --- a/Example/Pods/Manifest.lock +++ b/Example/Pods/Manifest.lock @@ -1,5 +1,5 @@ PODS: - - TableViewLiaison (1.0.2) + - TableViewLiaison (1.0.3) DEPENDENCIES: - TableViewLiaison (from `../`) @@ -9,7 +9,7 @@ EXTERNAL SOURCES: :path: "../" SPEC CHECKSUMS: - TableViewLiaison: 4de1af852d939db0ba4d892ad760a0d346ec5a60 + TableViewLiaison: c48125074fa532bd852f1f4cd1bafd1c9325f184 PODFILE CHECKSUM: f818d085ecc094e9577389f3dd62126b0c67c6c6 diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index 68eea45..6dd135c 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -69,11 +69,11 @@ 17E9F3BCCE82122EDF269A82E851D002 /* TableViewSectionComponentView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = TableViewSectionComponentView.swift; sourceTree = ""; }; 19A10E2085A6F35D84D00183AA3B665E /* TableViewRowCommand.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = TableViewRowCommand.swift; sourceTree = ""; }; 1E167870D969CCB057AECCFC8A66704B /* TableViewLiaison+UITableViewDataSourcePrefetching.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "TableViewLiaison+UITableViewDataSourcePrefetching.swift"; sourceTree = ""; }; - 1EFF66B2DD39937B320B901771C92BE6 /* Pods_TableViewLiaison_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_TableViewLiaison_Example.framework; path = "Pods-TableViewLiaison_Example.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1EFF66B2DD39937B320B901771C92BE6 /* Pods_TableViewLiaison_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_TableViewLiaison_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 20E1E39E9F37384BC7AD34EB2DFB1040 /* TableViewHeightType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = TableViewHeightType.swift; sourceTree = ""; }; 23551DE62EE3635B18432362E4DD6D07 /* TableViewRegistrationType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = TableViewRegistrationType.swift; sourceTree = ""; }; 27AECBBED6EF8093E1BCC647C10A38F8 /* Pods-TableViewLiaison_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-TableViewLiaison_Tests-acknowledgements.plist"; sourceTree = ""; }; - 36FECD0F53AAE0EACF9D67120F68CC59 /* TableViewLiaison.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; path = TableViewLiaison.podspec; sourceTree = ""; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 36FECD0F53AAE0EACF9D67120F68CC59 /* TableViewLiaison.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; path = TableViewLiaison.podspec; sourceTree = ""; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 3D8199053CC0D4A7938F7E76A8AD0007 /* TableViewLiaison.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = TableViewLiaison.modulemap; sourceTree = ""; }; 4749D85964F054ADE0C01F72DBF05189 /* Pods-TableViewLiaison_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-TableViewLiaison_Tests-umbrella.h"; sourceTree = ""; }; 49EC22D2241750534696D27E5F590755 /* AnyTableViewRow.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AnyTableViewRow.swift; sourceTree = ""; }; @@ -96,16 +96,16 @@ 8FD69900CC19612796691F222342A420 /* Pods-TableViewLiaison_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-TableViewLiaison_Tests.release.xcconfig"; sourceTree = ""; }; 92256764226915400D09832635489CBE /* PaginationTableViewCell.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PaginationTableViewCell.swift; sourceTree = ""; }; 98DD38E44B1CF1C417D87C8E497699CE /* TableViewContent.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = TableViewContent.swift; sourceTree = ""; }; - 99EF0B21EAF329BF515D828AA517206D /* TableViewLiaison.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = TableViewLiaison.framework; path = TableViewLiaison.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 9E6B02863445488371DF0F30DE4946E8 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; path = README.md; sourceTree = ""; }; + 99EF0B21EAF329BF515D828AA517206D /* TableViewLiaison.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TableViewLiaison.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 9E6B02863445488371DF0F30DE4946E8 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; A2B5C767CAA2610C6AE259EC646027B4 /* TableViewLiaisonPaginationDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = TableViewLiaisonPaginationDelegate.swift; sourceTree = ""; }; A8576C6DD35D33E86359341CEDBF4C26 /* Pods-TableViewLiaison_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-TableViewLiaison_Example-acknowledgements.markdown"; sourceTree = ""; }; AD161E5C8A976FBCE7C64B9B957FDF6B /* Pods-TableViewLiaison_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-TableViewLiaison_Example-acknowledgements.plist"; sourceTree = ""; }; B6DDE93447EE72DEBF8441C36FBB777C /* TableViewSectionComponentDisplayOption.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = TableViewSectionComponentDisplayOption.swift; sourceTree = ""; }; B8143A0084B93A33F3575B711D164C3B /* Pods-TableViewLiaison_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-TableViewLiaison_Tests-acknowledgements.markdown"; sourceTree = ""; }; BCA9FB0B4D7EEE0029C12E606D3F3D87 /* Pods-TableViewLiaison_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-TableViewLiaison_Example-dummy.m"; sourceTree = ""; }; - C198A71F0B43BB6BE9ED2E689C842DBA /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; path = LICENSE; sourceTree = ""; }; + C198A71F0B43BB6BE9ED2E689C842DBA /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; C3627E6270141F3D94BF5A8AFCB3A380 /* Array+SafeAccess.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Array+SafeAccess.swift"; sourceTree = ""; }; CB4607EFCA7C5F75397649E792E2AFCB /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; CB5177E80F74242EA432B65270A94930 /* TableViewLiaison+Row.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "TableViewLiaison+Row.swift"; sourceTree = ""; }; @@ -117,7 +117,7 @@ E9ADD5E1F3BDEA73A16ABAA84AB23AF6 /* TableViewLiaison+UITableViewDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "TableViewLiaison+UITableViewDelegate.swift"; sourceTree = ""; }; ED21D359F88D72B583354E2BFDE4A28F /* TableViewLiaison+Registration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "TableViewLiaison+Registration.swift"; sourceTree = ""; }; F25DD676FC9A44B47F95A7996596BCB1 /* TableViewRow.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = TableViewRow.swift; sourceTree = ""; }; - F633119E7AFA9576D7B246F4AF36B81A /* Pods_TableViewLiaison_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_TableViewLiaison_Tests.framework; path = "Pods-TableViewLiaison_Tests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + F633119E7AFA9576D7B246F4AF36B81A /* Pods_TableViewLiaison_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_TableViewLiaison_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; FA6BB5B3E5B4C06E1D0BE8C060C9EBE4 /* TableViewLiaison+UITableViewDataSource.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "TableViewLiaison+UITableViewDataSource.swift"; sourceTree = ""; }; FB9194D388694759FF829A406C2F5221 /* Pods-TableViewLiaison_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-TableViewLiaison_Example-frameworks.sh"; sourceTree = ""; }; FD108E6301C89D867C3212278347DC08 /* TableViewLiaison-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "TableViewLiaison-Info.plist"; sourceTree = ""; }; @@ -455,13 +455,14 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0930; - LastUpgradeCheck = 0930; + LastUpgradeCheck = 1020; }; buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, ); mainGroup = CF1408CF629C7361332E53B88F7BD30C; @@ -634,11 +635,10 @@ }; name = Debug; }; - 1C02ED271A6FF93F3833AB3E960E6273 /* Release */ = { + 0A297DE99A06D5CD255C0DB4013F0911 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 8CF6F0B0DEB0789991029ED313993C26 /* Pods-TableViewLiaison_Example.release.xcconfig */; + baseConfigurationReference = 4F0A07C296C81D2816212A08901F66D8 /* TableViewLiaison.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -648,29 +648,27 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-TableViewLiaison_Example/Pods-TableViewLiaison_Example-Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/TableViewLiaison/TableViewLiaison-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/TableViewLiaison/TableViewLiaison-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-TableViewLiaison_Example/Pods-TableViewLiaison_Example.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + MODULEMAP_FILE = "Target Support Files/TableViewLiaison/TableViewLiaison.modulemap"; + PRODUCT_MODULE_NAME = TableViewLiaison; + PRODUCT_NAME = TableViewLiaison; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; + name = Debug; }; - 27E2DA000A89D92CCC6462F354C1AE6B /* Debug */ = { + 1C02ED271A6FF93F3833AB3E960E6273 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 860F10DDB6EA369A90623B927FB55ABA /* Pods-TableViewLiaison_Tests.debug.xcconfig */; + baseConfigurationReference = 8CF6F0B0DEB0789991029ED313993C26 /* Pods-TableViewLiaison_Example.release.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CODE_SIGN_IDENTITY = ""; @@ -682,12 +680,12 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-TableViewLiaison_Tests/Pods-TableViewLiaison_Tests-Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-TableViewLiaison_Example/Pods-TableViewLiaison_Example-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-TableViewLiaison_Tests/Pods-TableViewLiaison_Tests.modulemap"; + MODULEMAP_FILE = "Target Support Files/Pods-TableViewLiaison_Example/Pods-TableViewLiaison_Example.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; @@ -696,14 +694,15 @@ SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; - 3AE4905CC229422231DF6FEA137C9C3C /* Release */ = { + 27E2DA000A89D92CCC6462F354C1AE6B /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 8FD69900CC19612796691F222342A420 /* Pods-TableViewLiaison_Tests.release.xcconfig */; + baseConfigurationReference = 860F10DDB6EA369A90623B927FB55ABA /* Pods-TableViewLiaison_Tests.debug.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CODE_SIGN_IDENTITY = ""; @@ -729,16 +728,16 @@ SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; + name = Debug; }; - 40A23411898EDE8591EFE54F91C50A7A /* Release */ = { + 3AE4905CC229422231DF6FEA137C9C3C /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 4F0A07C296C81D2816212A08901F66D8 /* TableViewLiaison.xcconfig */; + baseConfigurationReference = 8FD69900CC19612796691F222342A420 /* Pods-TableViewLiaison_Tests.release.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -748,18 +747,19 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/TableViewLiaison/TableViewLiaison-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/TableViewLiaison/TableViewLiaison-Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-TableViewLiaison_Tests/Pods-TableViewLiaison_Tests-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/TableViewLiaison/TableViewLiaison.modulemap"; - PRODUCT_MODULE_NAME = TableViewLiaison; - PRODUCT_NAME = TableViewLiaison; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-TableViewLiaison_Tests/Pods-TableViewLiaison_Tests.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -767,37 +767,6 @@ }; name = Release; }; - 622CFD990B7E01B501C8F961388AB3A2 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 4F0A07C296C81D2816212A08901F66D8 /* TableViewLiaison.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/TableViewLiaison/TableViewLiaison-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/TableViewLiaison/TableViewLiaison-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/TableViewLiaison/TableViewLiaison.modulemap"; - PRODUCT_MODULE_NAME = TableViewLiaison; - PRODUCT_NAME = TableViewLiaison; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.2; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; A1962E6FF39BBAC201A2E5DDF99557DF /* Release */ = { isa = XCBuildConfiguration; buildSettings = { @@ -851,8 +820,7 @@ MTL_FAST_MATH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; STRIP_INSTALLED_PRODUCT = NO; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SWIFT_VERSION = 4.2; SYMROOT = "${SRCROOT}/../build"; }; @@ -891,6 +859,38 @@ }; name = Debug; }; + FB89A371B6699E55CC07E31C81907012 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 4F0A07C296C81D2816212A08901F66D8 /* TableViewLiaison.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/TableViewLiaison/TableViewLiaison-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/TableViewLiaison/TableViewLiaison-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/TableViewLiaison/TableViewLiaison.modulemap"; + PRODUCT_MODULE_NAME = TableViewLiaison; + PRODUCT_NAME = TableViewLiaison; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -906,8 +906,8 @@ 93072F49F88DAB825BB6E94B24448E30 /* Build configuration list for PBXNativeTarget "TableViewLiaison" */ = { isa = XCConfigurationList; buildConfigurations = ( - 622CFD990B7E01B501C8F961388AB3A2 /* Debug */, - 40A23411898EDE8591EFE54F91C50A7A /* Release */, + 0A297DE99A06D5CD255C0DB4013F0911 /* Debug */, + FB89A371B6699E55CC07E31C81907012 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/Example/Pods/Target Support Files/TableViewLiaison/TableViewLiaison-Info.plist b/Example/Pods/Target Support Files/TableViewLiaison/TableViewLiaison-Info.plist index b35ab35..10ad18b 100644 --- a/Example/Pods/Target Support Files/TableViewLiaison/TableViewLiaison-Info.plist +++ b/Example/Pods/Target Support Files/TableViewLiaison/TableViewLiaison-Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.0.2 + 1.0.3 CFBundleSignature ???? CFBundleVersion diff --git a/Example/TableViewLiaison.xcodeproj/project.pbxproj b/Example/TableViewLiaison.xcodeproj/project.pbxproj index d076f2f..a1672b6 100644 --- a/Example/TableViewLiaison.xcodeproj/project.pbxproj +++ b/Example/TableViewLiaison.xcodeproj/project.pbxproj @@ -12,7 +12,6 @@ 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; }; 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; }; 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; }; - 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACEB1AFB9204008FA782 /* Tests.swift */; }; 7D054B812B06F68427BBC2E4 /* Pods_TableViewLiaison_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0F31E225D3F00A591E6B37D6 /* Pods_TableViewLiaison_Example.framework */; }; 8C6F501822AA9C7017A95512 /* Pods_TableViewLiaison_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 18B62CA01D5E027EA1CC96A7 /* Pods_TableViewLiaison_Tests.framework */; }; FC7980B52203544C006DA65D /* TimeInterval+SecondConversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC7980B42203544C006DA65D /* TimeInterval+SecondConversion.swift */; }; @@ -67,9 +66,8 @@ 607FACDF1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 607FACE51AFB9204008FA782 /* TableViewLiaison_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TableViewLiaison_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 607FACEB1AFB9204008FA782 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = ""; }; 7932F3F7C15FC354C43DFCD5 /* Pods-TableViewLiaison_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TableViewLiaison_Tests.release.xcconfig"; path = "Target Support Files/Pods-TableViewLiaison_Tests/Pods-TableViewLiaison_Tests.release.xcconfig"; sourceTree = ""; }; - 891E15B2EB84B907D318168F /* TableViewLiaison.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = TableViewLiaison.podspec; path = ../TableViewLiaison.podspec; sourceTree = ""; }; + 891E15B2EB84B907D318168F /* TableViewLiaison.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = TableViewLiaison.podspec; path = ../TableViewLiaison.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; A81B57C75BCA4F3111CEF8ED /* Pods-TableViewLiaison_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TableViewLiaison_Example.release.xcconfig"; path = "Target Support Files/Pods-TableViewLiaison_Example/Pods-TableViewLiaison_Example.release.xcconfig"; sourceTree = ""; }; CA854806A62D001789CDEDB9 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; D5CD999B81A68324F91F08E8 /* Pods-TableViewLiaison_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TableViewLiaison_Tests.debug.xcconfig"; path = "Target Support Files/Pods-TableViewLiaison_Tests/Pods-TableViewLiaison_Tests.debug.xcconfig"; sourceTree = ""; }; @@ -189,7 +187,6 @@ FC7980F222035AE9006DA65D /* TableViewSection+UnitTests.swift */, FC7980F322035AE9006DA65D /* TableViewSectionComponent+UnitTests.swift */, FC7980DD22035AC1006DA65D /* Fixtures */, - 607FACEB1AFB9204008FA782 /* Tests.swift */, 607FACE91AFB9204008FA782 /* Supporting Files */, ); path = Tests; @@ -221,7 +218,6 @@ D5CD999B81A68324F91F08E8 /* Pods-TableViewLiaison_Tests.debug.xcconfig */, 7932F3F7C15FC354C43DFCD5 /* Pods-TableViewLiaison_Tests.release.xcconfig */, ); - name = Pods; path = Pods; sourceTree = ""; }; @@ -345,25 +341,25 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0830; - LastUpgradeCheck = 1010; + LastUpgradeCheck = 1020; ORGANIZATIONNAME = CocoaPods; TargetAttributes = { 607FACCF1AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; DevelopmentTeam = Z3Y4VUCM48; - LastSwiftMigration = 0900; + LastSwiftMigration = 1020; }; 607FACE41AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; DevelopmentTeam = Z3Y4VUCM48; - LastSwiftMigration = 0900; + LastSwiftMigration = 1020; TestTargetID = 607FACCF1AFB9204008FA782; }; }; }; buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "TableViewLiaison" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, @@ -500,7 +496,6 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */, FC7980F622035AE9006DA65D /* TableViewSection+UnitTests.swift in Sources */, FC7980EF22035AD3006DA65D /* UITableView+SwizzleTesting.swift in Sources */, FC7980EA22035AD3006DA65D /* TestTableHeaderFooterView.swift in Sources */, @@ -658,8 +653,7 @@ MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -674,8 +668,7 @@ MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Release; }; @@ -693,8 +686,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TableViewLiaison_Example.app/TableViewLiaison_Example"; }; name = Debug; @@ -709,8 +701,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TableViewLiaison_Example.app/TableViewLiaison_Example"; }; name = Release; diff --git a/Example/TableViewLiaison.xcodeproj/xcshareddata/xcschemes/TableViewLiaison-Example.xcscheme b/Example/TableViewLiaison.xcodeproj/xcshareddata/xcschemes/TableViewLiaison-Example.xcscheme index 38c3794..b4b36d4 100644 --- a/Example/TableViewLiaison.xcodeproj/xcshareddata/xcschemes/TableViewLiaison-Example.xcscheme +++ b/Example/TableViewLiaison.xcodeproj/xcshareddata/xcschemes/TableViewLiaison-Example.xcscheme @@ -1,6 +1,6 @@ 🌀 | Closure based API for section and row configuration 📄 | Built-in paging functionality ✅ | Unit Tested -🐤 | Written in Swift 4.2 +🐤 | Written in Swift 5.0 `TableViewLiaison` is 🔨 with ❤️ by [📱 @ Shine Labs](https://www.shinelabs.tech). ## Requirements -- Xcode 10.0+ +- Xcode 10.2+ - iOS 9.0+ ## Installation diff --git a/TableViewLiaison.podspec b/TableViewLiaison.podspec index b0dd5ec..7aadf72 100644 --- a/TableViewLiaison.podspec +++ b/TableViewLiaison.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'TableViewLiaison' - s.version = '1.0.2' + s.version = '1.0.3' s.summary = 'Framework to help you better manage UITableViews.' s.description = 'TableViewLiaison abstracts and simplifies UITableView construction and management.' s.homepage = 'https://github.com/dylanshine/TableViewLiaison' @@ -17,5 +17,5 @@ Pod::Spec.new do |s| s.source = { :git => 'https://github.com/dylanshine/TableViewLiaison.git', :tag => s.version.to_s } s.ios.deployment_target = '9.0' s.source_files = 'TableViewLiaison/Classes/**/*' - s.swift_version = '4.2' + s.swift_version = '5.0' end diff --git a/TableViewLiaison/Classes/Liaison/TableViewLiaison+Row.swift b/TableViewLiaison/Classes/Liaison/TableViewLiaison+Row.swift index 80f25d0..d4df414 100644 --- a/TableViewLiaison/Classes/Liaison/TableViewLiaison+Row.swift +++ b/TableViewLiaison/Classes/Liaison/TableViewLiaison+Row.swift @@ -9,7 +9,7 @@ import UIKit public extension TableViewLiaison { - public func append(rows: [AnyTableViewRow], to section: Int = 0, animation: UITableView.RowAnimation = .automatic, animated: Bool = true) { + func append(rows: [AnyTableViewRow], to section: Int = 0, animation: UITableView.RowAnimation = .automatic, animated: Bool = true) { if waitingForPaginatedResults { endPagination(rows: rows, to: section, animation: animation, animated: animated) @@ -41,11 +41,11 @@ public extension TableViewLiaison { } - public func append(row: AnyTableViewRow, to section: Int = 0, animation: UITableView.RowAnimation = .automatic, animated: Bool = true) { + func append(row: AnyTableViewRow, to section: Int = 0, animation: UITableView.RowAnimation = .automatic, animated: Bool = true) { append(rows: [row], to: section, animation: animation, animated: animated) } - public func insert(row: AnyTableViewRow, at indexPath: IndexPath, with animation: UITableView.RowAnimation = .automatic, animated: Bool = true) { + func insert(row: AnyTableViewRow, at indexPath: IndexPath, with animation: UITableView.RowAnimation = .automatic, animated: Bool = true) { guard sections.indices.contains(indexPath.section) else { return } @@ -62,7 +62,7 @@ public extension TableViewLiaison { } @discardableResult - public func deleteRows(at indexPaths: [IndexPath], animation: UITableView.RowAnimation = .automatic, animated: Bool = true) -> [AnyTableViewRow] { + func deleteRows(at indexPaths: [IndexPath], animation: UITableView.RowAnimation = .automatic, animated: Bool = true) -> [AnyTableViewRow] { guard !indexPaths.isEmpty else { return [] } @@ -94,7 +94,7 @@ public extension TableViewLiaison { } @discardableResult - public func deleteRow(at indexPath: IndexPath, with animation: UITableView.RowAnimation = .automatic, animated: Bool = true) -> AnyTableViewRow? { + func deleteRow(at indexPath: IndexPath, with animation: UITableView.RowAnimation = .automatic, animated: Bool = true) -> AnyTableViewRow? { guard sections.indices.contains(indexPath.section) else { return nil } @@ -111,7 +111,7 @@ public extension TableViewLiaison { return row } - public func reloadRows(at indexPaths: [IndexPath], with animation: UITableView.RowAnimation = .automatic) { + func reloadRows(at indexPaths: [IndexPath], with animation: UITableView.RowAnimation = .automatic) { tableView?.beginUpdates() tableView?.reloadRows(at: indexPaths, with: animation) tableView?.endUpdates() @@ -123,11 +123,11 @@ public extension TableViewLiaison { } } - public func reloadRow(at indexPath: IndexPath, with animation: UITableView.RowAnimation = .automatic) { + func reloadRow(at indexPath: IndexPath, with animation: UITableView.RowAnimation = .automatic) { reloadRows(at: [indexPath], with: animation) } - public func replaceRow(at indexPath: IndexPath, with row: AnyTableViewRow, animation: UITableView.RowAnimation = .automatic, animated: Bool = true) { + func replaceRow(at indexPath: IndexPath, with row: AnyTableViewRow, animation: UITableView.RowAnimation = .automatic, animated: Bool = true) { guard sections.indices.contains(indexPath.section) else { return } @@ -149,7 +149,7 @@ public extension TableViewLiaison { } } - public func moveRow(from source: IndexPath, to destination: IndexPath, animation: UITableView.RowAnimation = .automatic, animated: Bool = true) { + func moveRow(from source: IndexPath, to destination: IndexPath, animation: UITableView.RowAnimation = .automatic, animated: Bool = true) { moveRow(from: source, to: destination) @@ -173,7 +173,7 @@ public extension TableViewLiaison { } } - public func swapRow(at source: IndexPath, with destination: IndexPath, animation: UITableView.RowAnimation = .automatic, animated: Bool = true) { + func swapRow(at source: IndexPath, with destination: IndexPath, animation: UITableView.RowAnimation = .automatic, animated: Bool = true) { let indices = sections.indices guard indices.contains(source.section) && indices.contains(destination.section) else { return } diff --git a/TableViewLiaison/Classes/Liaison/TableViewLiaison+Section.swift b/TableViewLiaison/Classes/Liaison/TableViewLiaison+Section.swift index db8a393..7982e84 100644 --- a/TableViewLiaison/Classes/Liaison/TableViewLiaison+Section.swift +++ b/TableViewLiaison/Classes/Liaison/TableViewLiaison+Section.swift @@ -9,7 +9,7 @@ import UIKit public extension TableViewLiaison { - public func append(sections: [TableViewSection], animation: UITableView.RowAnimation = .automatic, animated: Bool = true) { + func append(sections: [TableViewSection], animation: UITableView.RowAnimation = .automatic, animated: Bool = true) { if waitingForPaginatedResults { endPagination(sections: sections, animation: animation, animated: animated) @@ -31,11 +31,11 @@ public extension TableViewLiaison { } - public func append(section: TableViewSection, animation: UITableView.RowAnimation = .automatic, animated: Bool = true) { + func append(section: TableViewSection, animation: UITableView.RowAnimation = .automatic, animated: Bool = true) { append(sections: [section], animation: animation, animated: animated) } - public func insert(sections: [TableViewSection], startingAt index: Int, animation: UITableView.RowAnimation = .automatic, animated: Bool = true) { + func insert(sections: [TableViewSection], startingAt index: Int, animation: UITableView.RowAnimation = .automatic, animated: Bool = true) { guard !sections.isEmpty else { return } let indexRange = (index...(index + sections.count)) @@ -52,7 +52,7 @@ public extension TableViewLiaison { } } - public func insert(section: TableViewSection, at index: Int, animation: UITableView.RowAnimation = .automatic, animated: Bool = true) { + func insert(section: TableViewSection, at index: Int, animation: UITableView.RowAnimation = .automatic, animated: Bool = true) { sections.insert(section, at: index) register(section: section) @@ -62,7 +62,7 @@ public extension TableViewLiaison { } } - public func emptySection(at index: Int, animation: UITableView.RowAnimation = .automatic, animated: Bool = true) { + func emptySection(at index: Int, animation: UITableView.RowAnimation = .automatic, animated: Bool = true) { guard sections.indices.contains(index) else { return } @@ -75,7 +75,7 @@ public extension TableViewLiaison { } - public func deleteSection(at index: Int, animation: UITableView.RowAnimation = .automatic, animated: Bool = true) { + func deleteSection(at index: Int, animation: UITableView.RowAnimation = .automatic, animated: Bool = true) { guard sections.indices.contains(index) else { return } @@ -86,7 +86,7 @@ public extension TableViewLiaison { } } - public func replaceSection(at index: Int, with section: TableViewSection, animation: UITableView.RowAnimation = .automatic, animated: Bool = true) { + func replaceSection(at index: Int, with section: TableViewSection, animation: UITableView.RowAnimation = .automatic, animated: Bool = true) { guard sections.indices.contains(index) else { return } @@ -100,13 +100,13 @@ public extension TableViewLiaison { } } - public func reloadSection(at index: Int, with animation: UITableView.RowAnimation = .automatic) { + func reloadSection(at index: Int, with animation: UITableView.RowAnimation = .automatic) { tableView?.beginUpdates() tableView?.reloadSections(IndexSet(integer: index), with: animation) tableView?.endUpdates() } - public func moveSection(at: Int, to: Int, with animation: UITableView.RowAnimation = .automatic, animated: Bool = true) { + func moveSection(at: Int, to: Int, with animation: UITableView.RowAnimation = .automatic, animated: Bool = true) { guard sections.indices.contains(at) else { return } @@ -118,7 +118,7 @@ public extension TableViewLiaison { } } - public func clearSections(replacedBy sections: [TableViewSection] = [], + func clearSections(replacedBy sections: [TableViewSection] = [], animation: UITableView.RowAnimation = .automatic, animated: Bool = true) { @@ -136,7 +136,7 @@ public extension TableViewLiaison { append(sections: sections, animation: animation, animated: animated) } - public func swapSection(at source: Int, with destination: Int, animation: UITableView.RowAnimation = .automatic, animated: Bool = true) { + func swapSection(at source: Int, with destination: Int, animation: UITableView.RowAnimation = .automatic, animated: Bool = true) { guard sections.indices.contains(source) && sections.indices.contains(destination) else { return } sections.swapAt(source, destination) diff --git a/TableViewLiaison/Classes/Liaison/TableViewLiaison+UITableViewDataSource.swift b/TableViewLiaison/Classes/Liaison/TableViewLiaison+UITableViewDataSource.swift index f39efd7..57b32e7 100644 --- a/TableViewLiaison/Classes/Liaison/TableViewLiaison+UITableViewDataSource.swift +++ b/TableViewLiaison/Classes/Liaison/TableViewLiaison+UITableViewDataSource.swift @@ -42,7 +42,7 @@ extension TableViewLiaison: UITableViewDataSource { case .insert: guard let cell = tableView.cellForRow(at: indexPath) else { return } row(for: indexPath)?.perform(command: .insert, for: cell, at: indexPath) - case .none: + default: break } } diff --git a/TableViewLiaison/Classes/Liaison/TableViewLiaison.swift b/TableViewLiaison/Classes/Liaison/TableViewLiaison.swift index 6719bde..0502be1 100644 --- a/TableViewLiaison/Classes/Liaison/TableViewLiaison.swift +++ b/TableViewLiaison/Classes/Liaison/TableViewLiaison.swift @@ -72,6 +72,12 @@ public final class TableViewLiaison: NSObject { tv.isEditing = !tv.isEditing } + public func lastIndexPath(in section: Int) -> IndexPath? { + guard let row = sections.element(at: section)?.rows.count else { return nil } + guard row > 1 else { return IndexPath(row: 0, section: section) } + return IndexPath(row: row - 1, section: section) + } + func row(for indexPath: IndexPath) -> AnyTableViewRow? { guard let section = sections.element(at: indexPath.section) else { return nil } diff --git a/TableViewLiaison/Classes/Rows/TableViewRow.swift b/TableViewLiaison/Classes/Rows/TableViewRow.swift index 14a514c..a6c2216 100644 --- a/TableViewLiaison/Classes/Rows/TableViewRow.swift +++ b/TableViewLiaison/Classes/Rows/TableViewRow.swift @@ -124,7 +124,7 @@ open class TableViewRow: AnyTableViewRow { public extension TableViewRow where Model == Void { - public convenience init(editingStyle: UITableViewCell.EditingStyle = .none, + convenience init(editingStyle: UITableViewCell.EditingStyle = .none, movable: Bool = false, editActions: [UITableViewRowAction]? = nil, indentWhileEditing: Bool = false, diff --git a/TableViewLiaison/Classes/Sections/TableViewSectionComponent.swift b/TableViewLiaison/Classes/Sections/TableViewSectionComponent.swift index 1869cdb..fd44e60 100644 --- a/TableViewLiaison/Classes/Sections/TableViewSectionComponent.swift +++ b/TableViewLiaison/Classes/Sections/TableViewSectionComponent.swift @@ -90,7 +90,7 @@ open class TableViewSectionComponent: public extension TableViewSectionComponent where Model == Void { - public convenience init(registrationType: TableViewRegistrationType = .defaultClassType) { + convenience init(registrationType: TableViewRegistrationType = .defaultClassType) { self.init((), registrationType: registrationType) }