UIViewController Container APIs


To add a child view controller(VC) to a parent VC

[self addChildViewController:tradeVC];
[tradeVC didMoveToParentViewController:self];
[tradeVC release];
// and then add as a subview
[self.view addSubview: tradeVC.view];

while removing:
[self.view removeFromSuperview];
// and then remove from the parent VC
[self removeFromParentViewController];

Comments