From fcc5805dac6f00d4a10fa0dfa846cfe7c81d0859 Mon Sep 17 00:00:00 2001 From: Vlad Date: Fri, 7 Aug 2020 14:10:21 +0300 Subject: [PATCH 1/7] Replace retry button with retry view --- CHANGELOG.md | 6 ++++ LeadKit.podspec | 2 +- LeadKit.xcodeproj/project.pbxproj | 20 +++++++++++++ .../PaginationWrapper.swift | 19 +++++------- .../CustomizableButtonView.swift | 10 +++---- ...pperUIDelegate+DefaultImplementation.swift | 4 +-- .../UIButton/UIButton+ButtonHolder.swift | 29 ++++++++++++++++++ .../UIKit/ButtonHolder/ButtonHolder.swift | 30 +++++++++++++++++++ .../UIKit/ButtonHolder/ButtonHolderView.swift | 26 ++++++++++++++++ .../PaginationWrapperUIDelegate.swift | 10 +++---- 10 files changed, 132 insertions(+), 24 deletions(-) create mode 100644 Sources/Extensions/UIKit/UIButton/UIButton+ButtonHolder.swift create mode 100644 Sources/Protocols/UIKit/ButtonHolder/ButtonHolder.swift create mode 100644 Sources/Protocols/UIKit/ButtonHolder/ButtonHolderView.swift diff --git a/CHANGELOG.md b/CHANGELOG.md index 6fb2421f..c1fe613e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 0.9.34 +- **Add**: `ButtonHolder` - protocol that contains button property. +- **Add**: `ButtonHolderView` - view which contains button. +- **Add**: Conformance `UIButton` to `ButtonHolderView`. +- **[Breaking change]**: Replace functions `footerRetryButton() -> UIButton?` to `footerRetryView() -> ButtonHolderView?` and `footerRetryButtonHeight() -> CGFloat` to `footerRetryViewHeight() -> CGFloat` for `PaginationWrapperUIDelegate`. + ### 0.9.33 - **Fix**: `CustomizableButtonView` container class that provides great customization. - **Fix**: `CustomizableButtonViewModel` viewModel class for `CustomizableButtonView` configuration. diff --git a/LeadKit.podspec b/LeadKit.podspec index 73c4280c..33a7d43f 100644 --- a/LeadKit.podspec +++ b/LeadKit.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "LeadKit" - s.version = "0.9.33" + s.version = "0.9.34" s.summary = "iOS framework with a bunch of tools for rapid development" s.homepage = "https://github.com/TouchInstinct/LeadKit" s.license = "Apache License, Version 2.0" diff --git a/LeadKit.xcodeproj/project.pbxproj b/LeadKit.xcodeproj/project.pbxproj index 010fe015..b5340cff 100644 --- a/LeadKit.xcodeproj/project.pbxproj +++ b/LeadKit.xcodeproj/project.pbxproj @@ -16,6 +16,9 @@ 40F118471F8FEF97004AADAF /* AppearanceConfigurable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40F118461F8FEF97004AADAF /* AppearanceConfigurable.swift */; }; 40F118491F8FF223004AADAF /* TableRow+AppearanceExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40F118481F8FF223004AADAF /* TableRow+AppearanceExtension.swift */; }; 411073AF23466B41002DD9B9 /* UIViewController+PresentFullScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 411073AE23466B41002DD9B9 /* UIViewController+PresentFullScreen.swift */; }; + 4CF65D1424DD684A0006B001 /* ButtonHolder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF65D1324DD684A0006B001 /* ButtonHolder.swift */; }; + 4CF65D1624DD69250006B001 /* UIButton+ButtonHolder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF65D1524DD69250006B001 /* UIButton+ButtonHolder.swift */; }; + 4CF65D1824DD6C080006B001 /* ButtonHolderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF65D1724DD6C080006B001 /* ButtonHolderView.swift */; }; 67051ADB1EBC7C36008EADC0 /* SpinnerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67051ADA1EBC7C36008EADC0 /* SpinnerView.swift */; }; 67051ADD1EBC7C36008EADC0 /* SpinnerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67051ADA1EBC7C36008EADC0 /* SpinnerView.swift */; }; 6713C23720AF0C4D00875921 /* NetworkOperationState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6713C23620AF0C4D00875921 /* NetworkOperationState.swift */; }; @@ -550,6 +553,9 @@ 40F118461F8FEF97004AADAF /* AppearanceConfigurable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppearanceConfigurable.swift; sourceTree = ""; }; 40F118481F8FF223004AADAF /* TableRow+AppearanceExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "TableRow+AppearanceExtension.swift"; sourceTree = ""; }; 411073AE23466B41002DD9B9 /* UIViewController+PresentFullScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIViewController+PresentFullScreen.swift"; sourceTree = ""; }; + 4CF65D1324DD684A0006B001 /* ButtonHolder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ButtonHolder.swift; sourceTree = ""; }; + 4CF65D1524DD69250006B001 /* UIButton+ButtonHolder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIButton+ButtonHolder.swift"; sourceTree = ""; }; + 4CF65D1724DD6C080006B001 /* ButtonHolderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ButtonHolderView.swift; sourceTree = ""; }; 67051ADA1EBC7C36008EADC0 /* SpinnerView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpinnerView.swift; sourceTree = ""; }; 6713C23620AF0C4D00875921 /* NetworkOperationState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkOperationState.swift; sourceTree = ""; }; 6713C23B20AF0D5900875921 /* NetworkOperationModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkOperationModel.swift; sourceTree = ""; }; @@ -859,6 +865,15 @@ path = UITableView; sourceTree = ""; }; + 4CF65D1924DD6C3D0006B001 /* ButtonHolder */ = { + isa = PBXGroup; + children = ( + 4CF65D1324DD684A0006B001 /* ButtonHolder.swift */, + 4CF65D1724DD6C080006B001 /* ButtonHolderView.swift */, + ); + path = ButtonHolder; + sourceTree = ""; + }; 671461C41EB3396E00EAB194 /* Classes */ = { isa = PBXGroup; children = ( @@ -1433,6 +1448,7 @@ 6741CE9F20E2413300FEC4D9 /* UIKit */ = { isa = PBXGroup; children = ( + 4CF65D1924DD6C3D0006B001 /* ButtonHolder */, 6741CEA020E2416C00FEC4D9 /* ScrollViewHolder.swift */, 6741CEA420E2418200FEC4D9 /* TableViewHolder.swift */, 6741CEA820E2418B00FEC4D9 /* CollectionViewHolder.swift */, @@ -1845,6 +1861,7 @@ isa = PBXGroup; children = ( 67E352512119AC060035BDDB /* UIButton+ViewTextConfigurable.swift */, + 4CF65D1524DD69250006B001 /* UIButton+ButtonHolder.swift */, ); path = UIButton; sourceTree = ""; @@ -2397,6 +2414,7 @@ 67EB7FF8206175F700BDD9FB /* PaginationWrappable.swift in Sources */, 67990AD6213EA6A50040D195 /* ContentLoadingViewModel+Extensions.swift in Sources */, 671463541EB3396E00EAB194 /* StaticViewHeightProtocol.swift in Sources */, + 4CF65D1824DD6C080006B001 /* ButtonHolderView.swift in Sources */, 72AECC6B224A979D00D12E7C /* BaseSearchViewController.swift in Sources */, 673CF4112063ABD100C329F6 /* GeneralDataLoadingState+Extensions.swift in Sources */, 72005A1E2266226800ECE090 /* CustomizableButton.swift in Sources */, @@ -2424,6 +2442,7 @@ 671462FC1EB3396E00EAB194 /* UIView+XibNameProtocol.swift in Sources */, 67EB7FC0206140E600BDD9FB /* TotalCountCursor.swift in Sources */, 36DAAF512007CC920090BE0D /* UITableView+Extensions.swift in Sources */, + 4CF65D1624DD69250006B001 /* UIButton+ButtonHolder.swift in Sources */, 671463841EB3396E00EAB194 /* ResizeDrawingOperation.swift in Sources */, 6774528D20625C9E0024EEEF /* GeneralDataLoadingState.swift in Sources */, 72005A1F2266226800ECE090 /* CustomizableButtonViewModel.swift in Sources */, @@ -2500,6 +2519,7 @@ A6E0DDF11F8A6C80002CA74E /* SeparatorConfiguration.swift in Sources */, 6727477F206CD3BD00725163 /* ViewText+Extensions.swift in Sources */, 67EB7FEB2061667900BDD9FB /* DefaultTotalCountCursorListingResult.swift in Sources */, + 4CF65D1424DD684A0006B001 /* ButtonHolder.swift in Sources */, 671AD26C206A3E8500EAF887 /* Array+TotalCountCursorListingResult.swift in Sources */, 673CF4382063E7CE00C329F6 /* GeneralDataLoadingController+DefaultImplementation.swift in Sources */, B85B768720B1CF6700F837C4 /* Encodable+Extensions.swift in Sources */, diff --git a/Sources/Classes/DataLoading/PaginationDataLoading/PaginationWrapper.swift b/Sources/Classes/DataLoading/PaginationDataLoading/PaginationWrapper.swift index a0dfb8ba..53e2e40b 100644 --- a/Sources/Classes/DataLoading/PaginationDataLoading/PaginationWrapper.swift +++ b/Sources/Classes/DataLoading/PaginationDataLoading/PaginationWrapper.swift @@ -144,7 +144,7 @@ final public class PaginationWrapper UIButton? { + func footerRetryView() -> ButtonHolderView? { let retryButton = UIButton(type: .custom) retryButton.backgroundColor = .lightGray retryButton.setTitle("Retry load more", for: .normal) @@ -57,7 +57,7 @@ public extension PaginationWrapperUIDelegate { return retryButton } - func footerRetryButtonHeight() -> CGFloat { + func footerRetryViewHeight() -> CGFloat { return 44 } diff --git a/Sources/Extensions/UIKit/UIButton/UIButton+ButtonHolder.swift b/Sources/Extensions/UIKit/UIButton/UIButton+ButtonHolder.swift new file mode 100644 index 00000000..4c3c5e1d --- /dev/null +++ b/Sources/Extensions/UIKit/UIButton/UIButton+ButtonHolder.swift @@ -0,0 +1,29 @@ +// +// Copyright (c) 2020 Touch Instinct +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the Software), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import UIKit.UIButton + +public extension UIButton: ButtonHolderView { + var button: UIButton { + self + } +} diff --git a/Sources/Protocols/UIKit/ButtonHolder/ButtonHolder.swift b/Sources/Protocols/UIKit/ButtonHolder/ButtonHolder.swift new file mode 100644 index 00000000..0f3b4120 --- /dev/null +++ b/Sources/Protocols/UIKit/ButtonHolder/ButtonHolder.swift @@ -0,0 +1,30 @@ +// +// Copyright (c) 2020 Touch Instinct +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the Software), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import UIKit.UIButton + +/// Protocol that contains button property. +public protocol ButtonHolder { + + /// Contained UIButton instance. + var button: UIButton { get } +} diff --git a/Sources/Protocols/UIKit/ButtonHolder/ButtonHolderView.swift b/Sources/Protocols/UIKit/ButtonHolder/ButtonHolderView.swift new file mode 100644 index 00000000..22b08e84 --- /dev/null +++ b/Sources/Protocols/UIKit/ButtonHolder/ButtonHolderView.swift @@ -0,0 +1,26 @@ +// +// Copyright (c) 2020 Touch Instinct +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the Software), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import UIKit.UIView + +/// View which contains button +public typealias ButtonHolderView = UIView & ButtonHolder diff --git a/Sources/Structures/DataLoading/PaginationDataLoading/PaginationWrapperUIDelegate.swift b/Sources/Structures/DataLoading/PaginationDataLoading/PaginationWrapperUIDelegate.swift index 039eb2a4..2d004320 100644 --- a/Sources/Structures/DataLoading/PaginationDataLoading/PaginationWrapperUIDelegate.swift +++ b/Sources/Structures/DataLoading/PaginationDataLoading/PaginationWrapperUIDelegate.swift @@ -55,21 +55,21 @@ public protocol PaginationWrapperUIDelegate: class { /// - Returns: Configured instace of AnyLoadingIndicator. func loadingMoreIndicator() -> AnyLoadingIndicator? - /// Returns instance of UIButton for "retry load more" action. + /// Returns instance of ButtonHolderView with retry button for "retry load more" action. /// /// - Returns: Configured instace of AnyLoadingIndicator. - func footerRetryButton() -> UIButton? + func footerRetryView() -> ButtonHolderView? /// Returns height for "retry load more" button. /// /// - Returns: Height of "retry load more" button. - func footerRetryButtonHeight() -> CGFloat + func footerRetryViewHeight() -> CGFloat /// Method is called before "retry load more" will be shown. /// Typically, it's used when you need to show custom footer view. - func footerRetryButtonWillAppear() + func footerRetryViewWillAppear() /// Method is called before "retry load more" will be hidden. /// Typically, it's used when you need to hide custom footer view. - func footerRetryButtonWillDisappear() + func footerRetryViewWillDisappear() } From f0387692bc38784609533b136a0e99af9567c921 Mon Sep 17 00:00:00 2001 From: Vlad Date: Fri, 7 Aug 2020 14:14:16 +0300 Subject: [PATCH 2/7] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c1fe613e..bad7b4ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - **Add**: `ButtonHolderView` - view which contains button. - **Add**: Conformance `UIButton` to `ButtonHolderView`. - **[Breaking change]**: Replace functions `footerRetryButton() -> UIButton?` to `footerRetryView() -> ButtonHolderView?` and `footerRetryButtonHeight() -> CGFloat` to `footerRetryViewHeight() -> CGFloat` for `PaginationWrapperUIDelegate`. +- **[Breaking change]**: Replace functions `footerRetryButtonWillAppear()` to `footerRetryViewWillAppear()` and `footerRetryButtonWillDisappear()` to `footerRetryViewWillDisappear()` for `PaginationWrapperUIDelegate`. ### 0.9.33 - **Fix**: `CustomizableButtonView` container class that provides great customization. From 2c7c2c4ba591eb515bd507ee909b39cd0b892f56 Mon Sep 17 00:00:00 2001 From: Vlad Date: Fri, 7 Aug 2020 14:21:52 +0300 Subject: [PATCH 3/7] Fix visibility --- Sources/Extensions/UIKit/UIButton/UIButton+ButtonHolder.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/Extensions/UIKit/UIButton/UIButton+ButtonHolder.swift b/Sources/Extensions/UIKit/UIButton/UIButton+ButtonHolder.swift index 4c3c5e1d..26b493d9 100644 --- a/Sources/Extensions/UIKit/UIButton/UIButton+ButtonHolder.swift +++ b/Sources/Extensions/UIKit/UIButton/UIButton+ButtonHolder.swift @@ -22,8 +22,8 @@ import UIKit.UIButton -public extension UIButton: ButtonHolderView { - var button: UIButton { +extension UIButton: ButtonHolderView { + public var button: UIButton { self } } From 5fc4625bf6012388d511156126f8be054441faf1 Mon Sep 17 00:00:00 2001 From: Vlad Date: Fri, 7 Aug 2020 14:23:26 +0300 Subject: [PATCH 4/7] Fix conforming --- Sources/Extensions/UIKit/UIButton/UIButton+ButtonHolder.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Extensions/UIKit/UIButton/UIButton+ButtonHolder.swift b/Sources/Extensions/UIKit/UIButton/UIButton+ButtonHolder.swift index 26b493d9..cc124ddb 100644 --- a/Sources/Extensions/UIKit/UIButton/UIButton+ButtonHolder.swift +++ b/Sources/Extensions/UIKit/UIButton/UIButton+ButtonHolder.swift @@ -22,7 +22,7 @@ import UIKit.UIButton -extension UIButton: ButtonHolderView { +extension UIButton: ButtonHolder { public var button: UIButton { self } From a524ff7855b2d409004bcba6677c6db3259a2dbb Mon Sep 17 00:00:00 2001 From: Vlad Date: Fri, 7 Aug 2020 14:34:21 +0300 Subject: [PATCH 5/7] Fix naming --- .../Views/CustomizableButton/CustomizableButtonView.swift | 6 +++--- .../PaginationWrapperUIDelegate+DefaultImplementation.swift | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Sources/Classes/Views/CustomizableButton/CustomizableButtonView.swift b/Sources/Classes/Views/CustomizableButton/CustomizableButtonView.swift index 80488726..6f7b9046 100644 --- a/Sources/Classes/Views/CustomizableButton/CustomizableButtonView.swift +++ b/Sources/Classes/Views/CustomizableButton/CustomizableButtonView.swift @@ -288,8 +288,8 @@ private extension UIView { } } -public extension CustomizableButtonView { - struct Appearance { +extension CustomizableButtonView { + public struct Appearance { public var buttonFont: UIFont public var buttonStateAttributtedTitles: [UIControl.State: NSAttributedString] @@ -329,7 +329,7 @@ public extension CustomizableButtonView { } } - enum SpinnerPosition { + public enum SpinnerPosition { case center case leftToText(offset: CGFloat) case rightToText(offset: CGFloat) diff --git a/Sources/Extensions/DataLoading/PaginationDataLoading/PaginationWrapperUIDelegate+DefaultImplementation.swift b/Sources/Extensions/DataLoading/PaginationDataLoading/PaginationWrapperUIDelegate+DefaultImplementation.swift index 2fb39090..74819c6b 100644 --- a/Sources/Extensions/DataLoading/PaginationDataLoading/PaginationWrapperUIDelegate+DefaultImplementation.swift +++ b/Sources/Extensions/DataLoading/PaginationDataLoading/PaginationWrapperUIDelegate+DefaultImplementation.swift @@ -61,11 +61,11 @@ public extension PaginationWrapperUIDelegate { return 44 } - func footerRetryButtonWillAppear() { + func footerRetryViewWillAppear() { // by default - nothing will happen } - func footerRetryButtonWillDisappear() { + func footerRetryViewWillDisappear() { // by default - nothing will happen } } From 0f5a0d165ccf5c602b886847646308b71e66d2a7 Mon Sep 17 00:00:00 2001 From: Vlad Date: Fri, 7 Aug 2020 14:36:24 +0300 Subject: [PATCH 6/7] Add ButtonHolderView conformance --- CHANGELOG.md | 3 ++- .../Classes/Views/BasePlaceholderView/BasePlaceholerView.swift | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bad7b4ec..ee201d4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,8 @@ ### 0.9.34 - **Add**: `ButtonHolder` - protocol that contains button property. - **Add**: `ButtonHolderView` - view which contains button. -- **Add**: Conformance `UIButton` to `ButtonHolderView`. +- **Add**: Conformance `UIButton` to `ButtonHolder`. +- **Add**: Conformance `BasePlaceholderView` to `ButtonHolderView`. - **[Breaking change]**: Replace functions `footerRetryButton() -> UIButton?` to `footerRetryView() -> ButtonHolderView?` and `footerRetryButtonHeight() -> CGFloat` to `footerRetryViewHeight() -> CGFloat` for `PaginationWrapperUIDelegate`. - **[Breaking change]**: Replace functions `footerRetryButtonWillAppear()` to `footerRetryViewWillAppear()` and `footerRetryButtonWillDisappear()` to `footerRetryViewWillDisappear()` for `PaginationWrapperUIDelegate`. diff --git a/Sources/Classes/Views/BasePlaceholderView/BasePlaceholerView.swift b/Sources/Classes/Views/BasePlaceholderView/BasePlaceholerView.swift index 3e5e77d9..7687e1b3 100644 --- a/Sources/Classes/Views/BasePlaceholderView/BasePlaceholerView.swift +++ b/Sources/Classes/Views/BasePlaceholderView/BasePlaceholerView.swift @@ -24,7 +24,7 @@ import UIKit /// Layoutless placeholder view. This class is used as views holder & configurator. /// You should inherit it and implement layout. -open class BasePlaceholderView: UIView, InitializableView { +open class BasePlaceholderView: ButtonHolderView, InitializableView { /// Title label of placeholder view. public let titleLabel = UILabel() From b4b8785cdc4c6839959c5ad3dd854deb6faa91eb Mon Sep 17 00:00:00 2001 From: Vlad Date: Fri, 7 Aug 2020 14:43:37 +0300 Subject: [PATCH 7/7] Fix typo --- CHANGELOG.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ee201d4e..c655655b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,12 @@ # Changelog ### 0.9.34 -- **Add**: `ButtonHolder` - protocol that contains button property. -- **Add**: `ButtonHolderView` - view which contains button. -- **Add**: Conformance `UIButton` to `ButtonHolder`. -- **Add**: Conformance `BasePlaceholderView` to `ButtonHolderView`. -- **[Breaking change]**: Replace functions `footerRetryButton() -> UIButton?` to `footerRetryView() -> ButtonHolderView?` and `footerRetryButtonHeight() -> CGFloat` to `footerRetryViewHeight() -> CGFloat` for `PaginationWrapperUIDelegate`. -- **[Breaking change]**: Replace functions `footerRetryButtonWillAppear()` to `footerRetryViewWillAppear()` and `footerRetryButtonWillDisappear()` to `footerRetryViewWillDisappear()` for `PaginationWrapperUIDelegate`. +- **Add**: `ButtonHolder` - protocol that contains button property. +- **Add**: `ButtonHolderView` - view which contains button. +- **Add**: Conformance `UIButton` to `ButtonHolder`. +- **Add**: Conformance `BasePlaceholderView` to `ButtonHolderView`. +- **[Breaking change]**: Replace functions `footerRetryButton() -> UIButton?` to `footerRetryView() -> ButtonHolderView?` and `footerRetryButtonHeight() -> CGFloat` to `footerRetryViewHeight() -> CGFloat` for `PaginationWrapperUIDelegate`. +- **[Breaking change]**: Replace functions `footerRetryButtonWillAppear()` to `footerRetryViewWillAppear()` and `footerRetryButtonWillDisappear()` to `footerRetryViewWillDisappear()` for `PaginationWrapperUIDelegate`. ### 0.9.33 - **Fix**: `CustomizableButtonView` container class that provides great customization.