title: Getting array of images in UIImageView (in UIPageViewController)
body: <p>I've started from the standard PageView-based application template provided by Apple. Now instead of text I want the pages in the app to display images. An array is created as follows:</p>
  
  <pre><code> _pageData = [[NSArray alloc] initWithObjects:
                   [UIImage imageNamed:@"1.png"],
                   [UIImage imageNamed:@"2.png"],
                   [UIImage imageNamed:@"3.png"],
                   nil];
  </code></pre>
  
  <p>This array is handled the following way:</p>
  
  <pre><code>DataViewController *dataViewController = [storyboard instantiateViewControllerWithIdentifier:@"DataViewController"];
  dataViewController.dataObject = [self.pageData objectAtIndex:index];
  return dataViewController;
  </code></pre>
  
  <p>Then, in DataViewController.h:</p>
  
  <pre><code>@interface DataViewController : UIViewController
  
  @property (strong, nonatomic) IBOutlet UIImageView *imageView;
  @property (strong, nonatomic) UIImage *dataObject;
  </code></pre>
  
  <p>And in DataViewController.m I'm trying to display the images in de imageView in the following way:</p>
  
  <pre><code>- (void)viewWillAppear:(BOOL)animated
    {
      [super viewWillAppear:animated];
  
      self.imageView = [[UIImageView alloc] initWithImage:_dataObject];
  
      NSLog(@"dataObject %@", _dataObject);
  
    }
  </code></pre>
  
  <p>However, with this code I'm not succeeding in getting the images onto the PageViewController. Any idea how I could get this working properly?</p>
  
  <p>A big thanks for you help!</p>