次のような子View Controllerがあります。
別の親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.
}
元の子 VC では次のようになります。
ContainmentVC では次のようになります。
私は何を間違っていますか?
注: ChildVC で [Wants full screen] を選択する必要があります。そうしないと、上部に 20 ピクセルの空白が表示されます。