2

I am trying to display a QLpreviewcontroller on a UIVIewcontroller.

-(void)showPreview{

   if(!_previewController){
        _previewController = [[QLPreviewController alloc] init];
        _previewController.dataSource = self;
        _previewController.delegate = self;
    }

    // There will always be one item here
    _previewController.currentPreviewItemIndex = 0;

    [_previewController setModalTransitionStyle:UIModalTransitionStyleCoverVertical];
    [self presentViewController:_previewController animated:YES completion:nil];
}

the previecontroller is displayed but the transition is not animated. it just appears without any animation.

Kunal Balani
  • 4,739
  • 4
  • 36
  • 73
  • How are you calling this method? Is it possible that you're not calling it from the main thread? – jrushing Aug 26 '13 at 20:18
  • its a method called via IBAction. If this method is called via any other thread it won't display Previewcontroller at all. – Kunal Balani Aug 26 '13 at 20:28
  • Is there is something else you are doing like showing or dismissing alert/actionsheet or hiding or showing keyboard. – JiteshW Aug 27 '13 at 05:45

0 Answers0