UIDocumentInteractionController displaying blank pdf

后端 未结 2 1680
无人及你
无人及你 2021-02-09 01:45

I\'m trying to display a pdf on iOS devices using the UIDocumentInteractionController presentPreviewAnimated method, but it keeps displaying a blank document. I think it might h

相关标签:
2条回答
  • 2021-02-09 02:10

    This is working with the GM release of Xcode. Guess it was just a bug.

    0 讨论(0)
  • 2021-02-09 02:19

    I'm not using Swift, but I had basically the same problem with straight up Objective-C. Before iOS8, my UIDocumentInteractionController displayed pretty much every file type i threw at it including PDF. But in iOS8, the PDF files would no longer display for me.

    I WAS creating it this way:

    [[[UIDocumentInteractionController alloc] init] autorelease]
    

    I changed the call to create it like this:

    [UIDocumentInteractionController interactionControllerWithURL:myUrl]
    

    And now my PDF files display again (and the others appear to be ok too still).

    0 讨论(0)
提交回复
热议问题