title: iOS5 storyboard UIPageViewController
body: <p>I am developing an application and I am using iOS5 storyboard. Basically what I have is a UITabBarController as the root controller which contains some UIViewController and a UISplitViewController. What I want to do is to use a UIPageViewController as the DetailController of the UISplitViewController. The problem is that the UIPageViewController doesn't show its view controllers but it shows a black screen. What I do is to initialize two content view controllers in the viewDidLoad method of the DetailController and assign them with the instruction: </p>
  
  <p><code>[self setViewControllers:self.pagesViewControllerArray direction:UIPageViewControllerNavigationOrientationHorizontal animated:NO completion:nil];</code></p>
  
  <p>so I cannot figure out where is the mistake.</p>
  
  <p>The viewDidLoad method is the following:</p>
  
  <pre><code>- (void)viewDidLoad{
  
      self.dataSource = self;
      self.delegate = self;
  
      self.page1ViewController = [[Page1ViewController alloc] initWithNibName:@"Page1ViewController" bundle:nil];
      self.page2ViewController = [[Page2ViewController alloc] init];
  
      self.pagesViewControllerArray = [NSArray arrayWithObjects:self.page1ViewController, self.page2ViewController, nil];
  
      [self setViewControllers:self.pagesViewControllerArray direction:UIPageViewControllerNavigationOrientationHorizontal animated:NO completion:nil];
  
  } 
  </code></pre>
  
  <p>I tried to use both a viewcontroller with its nib associated and a viewcontroller with its view dynamically loaded but it is not working.</p>
  
  <p>Any help would be really appreciated.
  Thanks</p>