A question about container views in xCode with objective-C. When I add a container view to my project it is visible by default in it's parent view controller. My goal is for it to be invisible to start with and to present it via a UIButton with the
addChildViewController:
method. But for that I need it to not be there to begin with. I can fix this by setting it's view.alpha to 0, but it seems long winded, to have something that's visible and have to make it invisible to then make it visible again. It doesn't seem best practice. I've checked the doccumentation and found a lot of interesting things but nothing on this particular subject. Can anyone point me in the right direction? Thanks
---------------------------UPDATE----------------------------------------
This is what I've done so far. (there's a @property ChildViewController *vc in the h file with the required import). It's not working. As in, it's not hidding anything.
- (void)viewDidLoad {
[super viewDidLoad];
self.vc = [[ChildViewController alloc]init];
[self addChildViewController:self.vc];
[self.view addSubview:self.vc.view];
self.vc.view.hidden = YES;
}