I just tried it out and it doesn't seem to work, see picture. However, there is error or warning, and since a reference is a view controller - should it be possible?
Setting up a parent/child relationship with a container view is easy.Just create a container view inside the parent ViewController
, create the child view controller scene, and then control-drag from the container view to the child view controller to create the embed
segue.
If you want to swap the child view controllers depending on some condition, i.e. multiple child view controllers, just create a custom segue. This custom segue is named Empty and is a subclass of UIStoryboardSegue
with empty perform
method.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With