Make iOS ViewModelViewHost an actual view controller #874
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes #867 by renaming and obsoleting the old
ViewModelViewHostand implementing a new one that is a view controller. It takes care of adding the child view controller into the view controller hierarchy as well as adding the view itself as a subview. In addition, disposal has been cleaned up somewhat (previous view controller is disposed if a new view controller takes its place, such as when the VM changes).The old
ViewModelViewHosthas been renamed toViewModelViewHostLegacyand marked as obsolete. This will intentionally break people's code if they upgrade to RxUI 7 but still give them an easy-out if they insist on sticking with the old way of doings things. Of course, the intention is to eventually removeViewModelViewHostLegacyaltogether, so the obsolete warning is helpful in that regard.