BottleRocketStudios / iOS-UtiliKit

All the things you're tired of writing.
Apache License 2.0
23 stars 13 forks source link

ContainerViewController - Add ability to transition to empty child #85

Closed tylermilner closed 4 years ago

tylermilner commented 4 years ago

Currently, it doesn't seem like it's possible to remove a child from ContainerViewController. You seem to only be able to transition to a new child view controller (i.e. transitionToController(for:completion:) requires a non-nil ManagedChild).

I've run into a situation where I'd like to "reset" the ContainerViewController by removing all of its managed children, going back to an empty state where no child is displayed (i.e. what you get if you just initialize an empty ContainerViewController()).

Any suggestions for current workarounds are welcome.

wmcginty commented 4 years ago

Not sure there is a current work around for this - I would add it would be nice to add a property to the VC where you can specify a behavior that describes "what should I do with all the other children I have"?

wmcginty commented 4 years ago

Transferred to: https://github.com/BottleRocketStudios/iOS-Container/issues/3