Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable to add only the viewModel to child. #22

Merged
merged 2 commits into from
Sep 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ PODS:
- RxCocoa (5.1.1):
- RxRelay (~> 5)
- RxSwift (~> 5)
- RxController (0.10):
- RxController (0.11):
- RxCocoa (~> 5)
- RxFlow (~> 2.9)
- RxSwift (~> 5)
Expand Down Expand Up @@ -64,7 +64,7 @@ SPEC CHECKSUMS:
Reusable: 53a9acf5c536f229b31b5865782414b508252ddb
RxBinding: da433c012633802a72c2a5bec8775b86f4cddeb8
RxCocoa: 32065309a38d29b5b0db858819b5bf9ef038b601
RxController: adeab54a3771d0f12ce66b79d448a82a2b3b5930
RxController: f84e61f97e21b0d5bb7d950693fa50ecc4e77001
RxDataSources: efee07fa4de48477eca0a4611e6d11e2da9c1114
RxDataSourcesSingleSection: 4394e57ae097f33e3845cf3a57bdf7826eca2d38
RxFlow: 029e260333ef843b349ba9cb9265929941830aee
Expand Down
2 changes: 1 addition & 1 deletion RxController.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'RxController'
s.version = '0.10'
s.version = '0.11'
s.summary = 'A library for developing with MVVM-C based on RxFlow and RxSwift.'

# This description is used to generate tags and improve search results.
Expand Down
5 changes: 5 additions & 0 deletions RxController/Classes/RxViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,9 @@ open class RxViewController<ViewModel: RxViewModel>: UIViewController, RxViewCon
viewModel.addChild(childController.rxViewModel)
}

open func addChildViewModel(from childController: UIViewController) {
guard let childController = childController as? RxViewControllerProtocol else { return }
viewModel.addChild(childController.rxViewModel)
}

}