I have one main view as shown in picture. I add 2 subviews into that and each has their own view controller.
In ipadMainViewController, 
self.dTVC= [[dialoguesTableViewController alloc] initWithNibName:@"dialoguesTableViewController" bundle:nil];
[self.dTVC.view setFrame:rectFordTVC];
[self.view addSubview:self.dTVC.view];
After that, I want to remove the view of dialoguesTableViewController if I press a button in CategoriesViewController. But, I can't remove it. 
In CategoriesViewController, I write like this but dialoguesTableViewController can't be removed from ipadMainViewController. How shall I do this?
In CategoriesViewController, I write code like this but it is not working. 
self.dTVC= [[dialoguesTableViewController alloc] initWithNibName:@"dialoguesTableViewController" bundle:nil];
[self.dTVC.view removeFromSuperview];

 
     
     
     
    