I have one root viewcontroller loaded by app delegate and a second one (no nib file) that should be loaded as root controller's child (i want to display its view contained in root controller's view). Where and how should i do this? Is viewDidLoad method suitable for such initialization?
- (void)viewDidLoad {
MyViewController* pdfController = [[MyViewController alloc]init];
[self.view addSubview:pdfController.view];
[super viewDidLoad]; }
What about releasing such an object? Should I release it in dealloc or viewDidUnload or both? where viewDidUnload/dealloc will be called?