Strange issue with UIDocumentInteractionController

前端 未结 6 645
伪装坚强ぢ
伪装坚强ぢ 2020-12-30 05:20

I don\'t know what wrong with this code but everytime when I run the app, after the Menu is shown, the app crash.

NSString * path = [[NSBundle mainBundle] pa         


        
6条回答
  •  暖寄归人
    2020-12-30 05:59

    With Christian's technique...

    Should you decide to launch different PDFs from different buttons in the view rather than from the navigation bar, don't use:

    [controller autorelease];

    Because it will remove the controller, so further instances won't work after the first use.

    But if you are using it you may want to say

    [self.controller autorelease];

提交回复
热议问题