Modal transition via presentViewController:animated ignores the animation

1.2k views Asked by At

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.

0

There are 0 answers