title: Instantiating a view controller with identifier in Swift
body: <p>Normally I would've done the following to create a view controller and set its <code>dataSource</code> using <em>Objective-C</em>:</p>
  
  <pre><code>- (void)viewDidLoad
  {
      [super viewDidLoad];
      // Create the data model
      _pageTitles = @[@"Over 200 Tips and Tricks", @"Discover Hidden Features", @"Bookmark Favorite Tip", @"Free Regular Update"];
      _pageImages = @[@"page1.png", @"page2.png", @"page3.png", @"page4.png"];
  
      // Create page view controller
      self.pageViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"PageViewController"];
      self.pageViewController.dataSource = self;
  
      PageContentViewController *startingViewController = [self viewControllerAtIndex:0];
      NSArray *viewControllers = @[startingViewController];
      [self.pageViewController setViewControllers:viewControllers direction:UIPageViewControllerNavigationDirectionForward animated:NO completion:nil];
  
      // Change the size of page view controller
      self.pageViewController.view.frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height - 30);
  
      [self addChildViewController:_pageViewController];
      [self.view addSubview:_pageViewController.view];
      [self.pageViewController didMoveToParentViewController:self];
  
  }
  </code></pre>
  
  <p>Now I would like to convert it to <em>Swift</em>. This is my attempt so far:</p>
  
  <pre><code>override func viewDidLoad() {
      super.viewDidLoad()
  
      // Do any additional setup after loading the view, typically from a nib.
  
      // Create page view controller
      self.pageViewController = self.storyboard.instantiateViewControllerWithIdentifier("PageViewController") as UIPageViewController
      self.pageViewController.dataSource = self;
  
      var startingViewController = PageContentViewController(nibName: nil, bundle: nil)
      startingViewController = self.viewControllerAtIndex(0)
      var viewControllers: NSArray = [startingViewController];
      self.pageViewController.setViewControllers(viewControllers, direction: UIPageViewControllerNavigationDirection, animated: 0, completion: nil)
  
      // Change the size of page view controller
      self.pageViewController.view.frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height - 30);
  
      self.addChildViewController(self.pageViewController)
      self.view.addSubview(self.pageViewController.view)
      self.pageViewController.didMoveToParentViewController(self)
  }
  </code></pre>
  
  <p>I'm not sure why it's throwing an error for:</p>
  
  <pre><code>self.pageViewController.setViewControllers(viewControllers, direction: UIPageViewControllerNavigationDirection, animated: 0, completion: nil)
  </code></pre>
  
  <p><strong>Error: Expected member name or constructor call after type name.</strong></p>