I have a child view controller looking like this:
I am embedding it into another parent view controller,
@implementation ContainmentViewController
- (id)initWithCoder:(NSCoder *)decoder {
if(self = [super initWithCoder:decoder]) {
}
return self;
}
- (void)viewDidLoad
{
[super viewDidLoad];
self.prototypeVC = [self.storyboard instantiateViewControllerWithIdentifier:@"PrototypeViewController"];
[self addChildViewController:self.prototypeVC];
[self.view addSubview:self.prototypeVC.view];
[self.prototypeVC didMoveToParentViewController:self];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
This is how it should look like in the original child VC:;
This is how it looks like in the ContainmentVC:
What am I doing wrong?
NOTE: I have to pick "Wants full screen" on the ChildVC otherwise I will see a 20px white space at the top.