title: Code is exectuting but the view is not loading when called form a function?
body: <p>I am doing a book kinda application using a viewBased application. The mainView acts as the backgroundView for loading pages. Each page is a different view and have its own nib. When i swipe on a page(actually on the mainView which have loaded the current view/page), that page will be removed and the next/previous page will be added.</p>
  
  <pre><code>[currentPage.view removeFromSuperview];
  [self.view insertSubview:nextPage.view atIndex:0];
  </code></pre>
  
  <p>I have added a popoverController with a barbutton in this mainView. Its intialized with a tableviewController class named popClass. PopClass is another UITableViewController class which will act as the parent for the popViewController.</p>
  
  <pre><code>self.myPopController = [[PopController alloc] initWithStyle:UITableViewStylePlain];
  self.myPopOverController = [[UIPopoverController alloc] initWithContentViewController:myPopController];
  </code></pre>
  
  <p>When I select certain row in the popover, I want the backgroundview(mainView) to load the page corresponding to the number of the row.</p>
  
  <p>For that I have written a function in bookView(mainView) Controller class. And is calling it from the popOver's parent class when i select certain row.</p>
  
  <pre><code>- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
  {
  NSInteger toPageNumber = indexPath.row + 1;
  [viewController changeToPage:toPageNumber];
  }
  </code></pre>
  
  <p>Function and the lines of code are executing but nothing is happening. Even the log lines are printed but no action takes place. The code is the same for removing a page and adding another page which is working successfully when i swipe the view/page.</p>
  
  <p>What is the problem? OR is there anyother way to make the view change in mainView by using the popover?</p>