I've dragged a Container View onto one of my View Controllers. This comes with an Embed Segue. Running produces this:
'Could not instantiate class named UIStoryboardEmbedSegueTemplate'
So from a couple other stackoverflow questions it seems this isn't implemented in iOS 5. However, the questions didn't suggest the fix. XCode won't let me use any other kind of segue.
If the answer is to create a custom Container View I'll go with that. I've seen plenty of code for that in the past couple days. Just wondering if there was a way to do this using the provided Container View object.
To create a segue from the controller Control-drag from the View Controller icon to the Exit icon. Give this new segue the identifier unwind to reference it from the code.
Embed Segues are used by container views. These are views inside a viewController which loads another view from another viewController. If what you want is to present or push a view controller, you don't have to use an Embed segue.
The problem is that Embed segue is iOS 6+. It fails because you are trying to instantiate EmbedSegue internal class which does not exist in iOS 5. The obvious solution is not to use EmbedSegue if you need iOS 5 support :)
Here comes another question - what to use instead? I'm having the very same problem at the moment; I will share if I find any graceful architecture solution for that.
looks like the solution is quite obvious for any "old-school" iOS developer. Here's how you do that.
Now you should see view you did for your child VC in nib or storyboard will display in your parent's view where you specify it.
Hopefully this will help any seeking soul to decouple their logic :)
Cheers, Dan
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