Can I hide the Action button on the UIDocumentInteractionController view?

流过昼夜 提交于 2020-01-21 08:36:05

问题


I wanted to know if I can hide the Action button on the UIDocumentInteractionController so a user couldn't actually open the document in another app?


回答1:


I found something that works for me well enough:

- (BOOL)documentInteractionController:(UIDocumentInteractionController *)controller   canPerformAction:(SEL)action{
    return false;
}

It still shows the button but the popover that appears only has the print form but the print button is disabled.




回答2:


The whole purpose of the UIDocumentInteractionController is to show the user which applications can handle a file and give them a way to 'send' the file to the app they choose. Since hiding/disabling the button would confuse the user, I doubt it is possible (at least not without resorting to undocumented method calls).



来源:https://stackoverflow.com/questions/6117119/can-i-hide-the-action-button-on-the-uidocumentinteractioncontroller-view

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!