samedi 25 avril 2015

dismissViewControllerAnimated not being called on iPhone


I have the following code where I am trying to show a PDF preview. It words perfectly on an iPad however when I am trying to do it on a iPhone it dosnt work.

QLPreviewController* preview = [[QLPreviewController alloc] init];
        preview.dataSource = self;
        [self dismissViewControllerAnimated:YES completion:^{
            [self presentViewController:preview animated:YES completion:nil];
        }];

The thread on the iPhone never makes it to this line

[self presentViewController:preview animated:YES completion:nil];

but works fine on ipad.. I am not sure what to even look at. Any help would be appreaciated.


Aucun commentaire:

Enregistrer un commentaire