Embed Segue - iOS 5 Embed Segue - iOS 5 xcode xcode

Embed Segue - iOS 5


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.

  1. In your "parent" view controller instantiate "child" view controller in viewDidLoad: or whenever suitable
  2. [self addChildViewController:childVC];
  3. [self.view addSubview:childVC.view];
  4. childVC.view.frame = ....;

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