title: Adding QLPreviewController as subview doesn't load PDF
body: <p>I'm trying to add a QLPreviewController's view as a subview (no--I cannot use a nav controller or modal). It only shows the fabric background of the QLPreviewController.</p>
  
  <p>I create one and add it as a subview:</p>
  
  <pre><code>QLPreviewController* preview = [[[QLPreviewController alloc] init] autorelease];
  preview.dataSource = self;
  preview.delegate = self;
  preview.view.frame = CGRectMake(0, 0, self.pdfPreviewView.frame.size.width, self.pdfPreviewView.frame.size.height);
  self.pdfPreviewView.previewController = preview;
  [self.pdfPreviewView addSubview:preview.view];
  [preview reloadData];
  </code></pre>
  
  <p>My QLPreviewControllerDataSource methods work fine (viewing 1 pdf at a time):</p>
  
  <pre><code>- (id &lt;QLPreviewItem&gt;) previewController: (QLPreviewController *) controller previewItemAtIndex: (NSInteger) index
  {
      NSString *path = [[ResourceManager defaultManager] pathForPDF:self.currentPDF];
      NSURL *url = [NSURL fileURLWithPath:path];
  
      if ([QLPreviewController canPreviewItem:url]) {
          return url; // This always returns
      }
  
      return nil; // This line is never executed
  }
  - (NSInteger)numberOfPreviewItemsInPreviewController:(QLPreviewController *)controller
  {
      return 1;
  }
  </code></pre>
  
  <p>The data source method always returns the file url, and QLPreviewController says it can open the file, but it never actually does. I just get the background. The <code>self.currentPDF</code> is set before I create the QLPreviewController and does contain the correct information (from CoreData).</p>
  
  <p>The delegate methods never get called. But I'm also not using it in a standard way, so that's not totally unexpected.</p>
  
  <p>I've also tried calling <code>[preview setNeedsLayout]</code>, <code>[preview setNeedsDisplay']</code>, and <code>[preview refreshCurrentPreviewItem]</code> but those just call the data source methods and don't change anything.</p>
  
  <p>The PDFs are valid. I can open them in both Xcode and Preview, so that's not the problem. I'm kind of stumped as to why this won't work. Any help would be appreciated in getting this to work.</p>