From dfa4a7c0f9cba3a9335d0777ebedc269db06578b Mon Sep 17 00:00:00 2001 From: Maxim Sorokin Date: Tue, 18 Aug 2020 13:48:17 +0300 Subject: [PATCH] fix naming --- CHANGELOG.md | 2 +- LeadKit.xcodeproj/project.pbxproj | 14 +++++++------- .../BaseRxTableViewCell.swift} | 2 +- .../ContainerTableCell/ContainerTableCell.swift | 16 ++++++++-------- 4 files changed, 17 insertions(+), 17 deletions(-) rename Sources/Classes/Views/{BaseTableViewCell/BaseTableViewCell.swift => BaseRxTableViewCell/BaseRxTableViewCell.swift} (95%) diff --git a/CHANGELOG.md b/CHANGELOG.md index d5d6934b..a63effb4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ # Changelog ### 0.9.37 -- **Add**: `BaseTableViewCell` is subclass of `UITableViewCell` class with support `InitializableView` and `DisposeBagHolder` protocols. +- **Add**: `BaseRxTableViewCell` is subclass of `UITableViewCell` class with support `InitializableView` and `DisposeBagHolder` protocols. - **Add**: `ContainerTableCell` is container class that provides wrapping any `UIView` into `UITableViewCell`. - **Add**: `BaseTappableViewModel` is simplifies interaction between view and viewModel for events of tapping. - **Add**: `VoidTappableViewModel` is subclass of `BaseTappableViewModel` class with void payload type. diff --git a/LeadKit.xcodeproj/project.pbxproj b/LeadKit.xcodeproj/project.pbxproj index c02b6e74..66fb2a14 100644 --- a/LeadKit.xcodeproj/project.pbxproj +++ b/LeadKit.xcodeproj/project.pbxproj @@ -20,7 +20,7 @@ 4CF65D1624DD69250006B001 /* UIButton+ButtonHolder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF65D1524DD69250006B001 /* UIButton+ButtonHolder.swift */; }; 4CF65D1824DD6C080006B001 /* ButtonHolderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF65D1724DD6C080006B001 /* ButtonHolderView.swift */; }; 52421F8D24EAB52E00948DD1 /* ContainerTableCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52421F8C24EAB52E00948DD1 /* ContainerTableCell.swift */; }; - 52421F8F24EAB84900948DD1 /* BaseTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52421F8E24EAB84900948DD1 /* BaseTableViewCell.swift */; }; + 52421F8F24EAB84900948DD1 /* BaseRxTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52421F8E24EAB84900948DD1 /* BaseRxTableViewCell.swift */; }; 52421F9424EBCFAE00948DD1 /* VoidTappableViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52421F9324EBCFAE00948DD1 /* VoidTappableViewModel.swift */; }; 52421F9624EBCFBB00948DD1 /* BaseTappableViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52421F9524EBCFBB00948DD1 /* BaseTappableViewModel.swift */; }; 67051ADB1EBC7C36008EADC0 /* SpinnerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67051ADA1EBC7C36008EADC0 /* SpinnerView.swift */; }; @@ -561,7 +561,7 @@ 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 = ""; }; 52421F8C24EAB52E00948DD1 /* ContainerTableCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContainerTableCell.swift; sourceTree = ""; }; - 52421F8E24EAB84900948DD1 /* BaseTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BaseTableViewCell.swift; sourceTree = ""; }; + 52421F8E24EAB84900948DD1 /* BaseRxTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BaseRxTableViewCell.swift; sourceTree = ""; }; 52421F9324EBCFAE00948DD1 /* VoidTappableViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VoidTappableViewModel.swift; sourceTree = ""; }; 52421F9524EBCFBB00948DD1 /* BaseTappableViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseTappableViewModel.swift; sourceTree = ""; }; 67051ADA1EBC7C36008EADC0 /* SpinnerView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpinnerView.swift; sourceTree = ""; }; @@ -890,12 +890,12 @@ path = ContainerTableCell; sourceTree = ""; }; - 52421F9024EAB84E00948DD1 /* BaseTableViewCell */ = { + 52421F9024EAB84E00948DD1 /* BaseRxTableViewCell */ = { isa = PBXGroup; children = ( - 52421F8E24EAB84900948DD1 /* BaseTableViewCell.swift */, + 52421F8E24EAB84900948DD1 /* BaseRxTableViewCell.swift */, ); - path = BaseTableViewCell; + path = BaseRxTableViewCell; sourceTree = ""; }; 52421F9124EBCF6E00948DD1 /* ViewModels */ = { @@ -961,7 +961,7 @@ 671461D41EB3396E00EAB194 /* Views */ = { isa = PBXGroup; children = ( - 52421F9024EAB84E00948DD1 /* BaseTableViewCell */, + 52421F9024EAB84E00948DD1 /* BaseRxTableViewCell */, 52421F8B24EAB52E00948DD1 /* ContainerTableCell */, 72005A1A2266226800ECE090 /* CustomizableButton */, 677B06B6211873E7006C947D /* BasePlaceholderView */, @@ -2605,7 +2605,7 @@ 52421F9424EBCFAE00948DD1 /* VoidTappableViewModel.swift in Sources */, 67745279206252020024EEEF /* DataLoadingState.swift in Sources */, 671463641EB3396E00EAB194 /* ViewHeightProtocol.swift in Sources */, - 52421F8F24EAB84900948DD1 /* BaseTableViewCell.swift in Sources */, + 52421F8F24EAB84900948DD1 /* BaseRxTableViewCell.swift in Sources */, 67EB7FDA20615D5B00BDD9FB /* ResettableRxCursorDataSource.swift in Sources */, 671462481EB3396E00EAB194 /* FixedPageCursor.swift in Sources */, 671462C81EB3396E00EAB194 /* String+Localization.swift in Sources */, diff --git a/Sources/Classes/Views/BaseTableViewCell/BaseTableViewCell.swift b/Sources/Classes/Views/BaseRxTableViewCell/BaseRxTableViewCell.swift similarity index 95% rename from Sources/Classes/Views/BaseTableViewCell/BaseTableViewCell.swift rename to Sources/Classes/Views/BaseRxTableViewCell/BaseRxTableViewCell.swift index 57035d0f..4ec4ff74 100644 --- a/Sources/Classes/Views/BaseTableViewCell/BaseTableViewCell.swift +++ b/Sources/Classes/Views/BaseRxTableViewCell/BaseRxTableViewCell.swift @@ -22,7 +22,7 @@ import RxSwift -open class BaseTableViewCell: UITableViewCell, InitializableView, DisposeBagHolder { +open class BaseRxTableViewCell: UITableViewCell, InitializableView, DisposeBagHolder { // MARK: - Properties diff --git a/Sources/Classes/Views/ContainerTableCell/ContainerTableCell.swift b/Sources/Classes/Views/ContainerTableCell/ContainerTableCell.swift index 3c7daf90..438979ce 100644 --- a/Sources/Classes/Views/ContainerTableCell/ContainerTableCell.swift +++ b/Sources/Classes/Views/ContainerTableCell/ContainerTableCell.swift @@ -23,11 +23,11 @@ import RxSwift import TableKit -open class ContainerTableCell: BaseTableViewCell, ConfigurableCell where TView: ConfigurableView { +open class ContainerTableCell: BaseRxTableViewCell, ConfigurableCell where TView: ConfigurableView { // MARK: - Properties - public let view = TView() + public let wrappedView = TView() open var shouldConfigureDefaultConstraints: Bool { true @@ -44,7 +44,7 @@ open class ContainerTableCell: BaseTableViewCell, ConfigurableCel // MARK: - ConfigurableCell open func configure(with viewModel: TView.ViewModelType) { - view.configure(with: viewModel) + wrappedView.configure(with: viewModel) } // MARK: - InitializableView @@ -52,18 +52,18 @@ open class ContainerTableCell: BaseTableViewCell, ConfigurableCel override open func addViews() { super.addViews() - contentView.addSubview(view) + contentView.addSubview(wrappedView) } override open func configureLayout() { super.configureLayout() if shouldConfigureDefaultConstraints { - view.snp.makeConstraints { make in - make.edges.equalToSuperview().inset(contentInsets) + wrappedView.snp.makeConstraints { + $0.edges.equalToSuperview().inset(contentInsets) } } else { - configureCustomConstraints(forView: view) + configureCustomConstraints(forWrappedView: wrappedView) } } @@ -74,5 +74,5 @@ open class ContainerTableCell: BaseTableViewCell, ConfigurableCel backgroundColor = contentViewBackgroundColor } - open func configureCustomConstraints(forView view: UIView) { } + open func configureCustomConstraints(forWrappedView view: TView) { } }