diff --git a/CHANGELOG.md b/CHANGELOG.md index e58d3745..3ba6b352 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. +## [5.0.0-beta.3](https://github.com/DenHeadless/DTTableViewManager/releases/tag/5.0.0-beta.3) + +* `DTModelStorage` dependency now requires `Realm 2.0` +* `UITableViewDelegate` `heightForHeaderInSection` and `heightForFooterInSection` are now properly called on the delegate, if it implements it(thanks, @augmentedworks!). + ## [5.0.0-beta.2](https://github.com/DenHeadless/DTTableViewManager/releases/tag/5.0.0-beta.2) ### Added diff --git a/Cartfile b/Cartfile index cb8d4a2a..11f43e18 100644 --- a/Cartfile +++ b/Cartfile @@ -1 +1 @@ -github "DenHeadless/DTModelStorage" "3.0.0-beta.1" +github "DenHeadless/DTModelStorage" "3.0.0-beta.3" diff --git a/Cartfile.private b/Cartfile.private index 6468fc0a..d73d5beb 100644 --- a/Cartfile.private +++ b/Cartfile.private @@ -1 +1 @@ -github "Quick/Nimble" "master" +github "Quick/Nimble" "v5.0.0" diff --git a/Cartfile.resolved b/Cartfile.resolved index 99ac74e6..873b5d20 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,3 +1,3 @@ -github "Quick/Nimble" "db706fc1d7130f6ac96c56aaf0e635fa3217fe57" -github "realm/realm-cocoa" "v1.1.0" -github "DenHeadless/DTModelStorage" "3.0.0-beta.1" +github "Quick/Nimble" "v5.0.0" +github "realm/realm-cocoa" "v2.0.2" +github "DenHeadless/DTModelStorage" "3.0.0-beta.3" diff --git a/Carthage/Checkouts/DTModelStorage b/Carthage/Checkouts/DTModelStorage index 88ea0597..31e9ac3a 160000 --- a/Carthage/Checkouts/DTModelStorage +++ b/Carthage/Checkouts/DTModelStorage @@ -1 +1 @@ -Subproject commit 88ea0597ebdd2a9d1fe8e1272b25bf1d2d6b79da +Subproject commit 31e9ac3aa2ba957039b6a2446748d12cdbbfee3d diff --git a/Carthage/Checkouts/realm-cocoa b/Carthage/Checkouts/realm-cocoa index 5fbb4ce8..dcc66532 160000 --- a/Carthage/Checkouts/realm-cocoa +++ b/Carthage/Checkouts/realm-cocoa @@ -1 +1 @@ -Subproject commit 5fbb4ce86b0679c2ced0babd2f1cfaf33f5dd68f +Subproject commit dcc6653205e796d4bfc79082d3c9b1849d263ab5 diff --git a/DTTableViewManager.podspec b/DTTableViewManager.podspec index 87d9d000..83f74196 100644 --- a/DTTableViewManager.podspec +++ b/DTTableViewManager.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'DTTableViewManager' - s.version = '5.0.0-beta.2' + s.version = '5.0.0-beta.3' s.license = 'MIT' s.summary = 'Protocol-oriented UITableView management, powered by generics and associated types.' s.homepage = 'https://github.com/DenHeadless/DTTableViewManager' @@ -12,5 +12,5 @@ Pod::Spec.new do |s| s.ios.deployment_target = '8.0' s.tvos.deployment_target = '9.0' s.frameworks = 'UIKit', 'Foundation' - s.dependency 'DTModelStorage' , '~> 3.0.0-beta.2' + s.dependency 'DTModelStorage' , '~> 3.0.0-beta.3' end diff --git a/DTTableViewManager.xcodeproj/project.pbxproj b/DTTableViewManager.xcodeproj/project.pbxproj index 4cecbf04..2da18026 100644 --- a/DTTableViewManager.xcodeproj/project.pbxproj +++ b/DTTableViewManager.xcodeproj/project.pbxproj @@ -83,12 +83,6 @@ 9A587D861CE335D80094C821 /* DTModelStorage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A587D541CE334E70094C821 /* DTModelStorage.framework */; }; 9A587D871CE335DF0094C821 /* DTModelStorage.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9A587D541CE334E70094C821 /* DTModelStorage.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 9A6CED701BE570750091B0AF /* DTTableViewManager.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A2A38BC1AEE285E0021E97D /* DTTableViewManager.framework */; }; - 9A892A6F1D997ACD0044A4A9 /* Realm.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A892A6E1D997ACD0044A4A9 /* Realm.framework */; }; - 9A892A711D997AD10044A4A9 /* RealmSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A892A701D997AD10044A4A9 /* RealmSwift.framework */; }; - 9A892A721D997ADD0044A4A9 /* RealmSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A892A701D997AD10044A4A9 /* RealmSwift.framework */; }; - 9A892A731D997ADD0044A4A9 /* RealmSwift.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9A892A701D997AD10044A4A9 /* RealmSwift.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 9A892A741D997ADD0044A4A9 /* Realm.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A892A6E1D997ACD0044A4A9 /* Realm.framework */; }; - 9A892A751D997ADD0044A4A9 /* Realm.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9A892A6E1D997ACD0044A4A9 /* Realm.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 9A9B17071B65771600D8ABD3 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A9B17061B65771600D8ABD3 /* AppDelegate.swift */; }; 9A9B170E1B65771600D8ABD3 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9A9B170C1B65771600D8ABD3 /* Main.storyboard */; }; 9A9B17101B65771600D8ABD3 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9A9B170F1B65771600D8ABD3 /* Images.xcassets */; }; @@ -262,10 +256,8 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( - 9A892A751D997ADD0044A4A9 /* Realm.framework in CopyFiles */, 9A587D871CE335DF0094C821 /* DTModelStorage.framework in CopyFiles */, 9AA3E6C51BA84CB4004950AE /* DTTableViewManager.framework in CopyFiles */, - 9A892A731D997ADD0044A4A9 /* RealmSwift.framework in CopyFiles */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -380,10 +372,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 9A892A741D997ADD0044A4A9 /* Realm.framework in Frameworks */, - 9A892A711D997AD10044A4A9 /* RealmSwift.framework in Frameworks */, - 9A892A721D997ADD0044A4A9 /* RealmSwift.framework in Frameworks */, - 9A892A6F1D997ACD0044A4A9 /* Realm.framework in Frameworks */, 9A587D861CE335D80094C821 /* DTModelStorage.framework in Frameworks */, 9A9B17261B65772E00D8ABD3 /* DTTableViewManager.framework in Frameworks */, ); diff --git a/Source/DTTableViewManager.swift b/Source/DTTableViewManager.swift index e69ebe01..55141446 100644 --- a/Source/DTTableViewManager.swift +++ b/Source/DTTableViewManager.swift @@ -896,6 +896,9 @@ extension DTTableViewManager: UITableViewDelegate if let height = performHeaderReaction(.heightForHeaderInSection, location: section, provideView: false) as? CGFloat { return height } + if let height = (delegate as? UITableViewDelegate)?.tableView?(tableView, heightForHeaderInSection: section) { + return height + } if configuration.sectionHeaderStyle == .title { if let _ = self.headerModel(forSection:section) { @@ -908,7 +911,7 @@ extension DTTableViewManager: UITableViewDelegate { return self.tableView?.sectionHeaderHeight ?? CGFloat.leastNormalMagnitude } - return (delegate as? UITableViewDelegate)?.tableView?(tableView, heightForHeaderInSection: section) ?? CGFloat.leastNormalMagnitude + return CGFloat.leastNormalMagnitude } open func tableView(_ tableView: UITableView, estimatedHeightForHeaderInSection section: Int) -> CGFloat { @@ -922,6 +925,9 @@ extension DTTableViewManager: UITableViewDelegate if let height = performFooterReaction(.heightForFooterInSection, location: section, provideView: false) as? CGFloat { return height } + if let height = (delegate as? UITableViewDelegate)?.tableView?(tableView, heightForFooterInSection: section) { + return height + } if configuration.sectionFooterStyle == .title { if let _ = self.footerModelForSectionIndex(section) { return UITableViewAutomaticDimension @@ -932,7 +938,7 @@ extension DTTableViewManager: UITableViewDelegate if let _ = self.footerModelForSectionIndex(section) { return self.tableView?.sectionFooterHeight ?? CGFloat.leastNormalMagnitude } - return (delegate as? UITableViewDelegate)?.tableView?(tableView, heightForFooterInSection: section) ?? CGFloat.leastNormalMagnitude + return CGFloat.leastNormalMagnitude } open func tableView(_ tableView: UITableView, estimatedHeightForFooterInSection section: Int) -> CGFloat {