title: Unrecognized selector sent to instance when UIPageViewController.dataSource is set?
body: <p>I am attempting to programmatically create a page view in a subview. However, when I set the dataSource of the UIPageViewController to the superviewcontroller, I get this error:</p>
  
  <pre><code>-[UIView scrollView]: unrecognized selector sent to instance 0x7fc223ea8300
  *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIView scrollView]: unrecognized selector sent to instance 0x7fc223ea8300'
  </code></pre>
  
  <p>Here is my code:</p>
  
  <pre><code>import UIKit
  class MainVC: UIViewController, UIPageViewControllerDataSource {
      private var pages: [UIViewController]
      private let pageVC: UIPageViewController
      init() {
          pages = [UIViewController]()
          for i in 0...1 {
              let vc = UIViewController()
              vc.view = MyUIViewSubclass(index: i)
              pages.append(vc)
          }
          pageVC = UIPageViewController(transitionStyle: .Scroll, navigationOrientation: .Horizontal, options: nil)
          pageVC.view = UIView()
          pageVC.view.translatesAutoresizingMaskIntoConstraints = false
          super.init(nibName: nil, bundle: nil)
          pageVC.dataSource = self //Breakpoints indicate that this is when the exception occurs
          view.addSubview(pageVC.view)
          //...Autolayout...
      }
      required init?(coder aDecoder: NSCoder) {
          fatalError("init(coder:) has not been implemented")
      }
      func pageViewController(pageViewController: UIPageViewController, viewControllerBeforeViewController viewController: UIViewController) -&gt; UIViewController? {
          return pages[0]
      }
      func pageViewController(pageViewController: UIPageViewController, viewControllerAfterViewController viewController: UIViewController) -&gt; UIViewController? {
          return pages[1]
      }
  }
  </code></pre>
  
  <p>Thanks in advance.</p>