Agreed on the fact that deprecating 'canPerformAction' in the delegate is troublesome, we lost the fine grain control we used to have.
However, if all you want is to allow a document to be opened in another app, and wanted to remove Copy, Print and even Mail, I guess you are better off using OpenIn
version of method to present the UIDocumentInteractionController
?
i.e. for your UIDocumentInteractionController
use presentOpenInMenuFromBarButtonItem:animated:
or presentOpenInMenuFromRect:inView:animated:
(instead of presentOptionsMenuFromBarButtonItem:animated:
or presentOptionsMenuFromRect:inView:animated:
)
This way, by default, it will only show apps that can open your document, and hides Mail, Copy and Print.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…