1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
| -(BOOL)documentInteractionController:(UIDocumentInteractionController *)controller canPerformAction:(nullable SEL)action{ // 响应方法 NSLog(@"12 %s", __func__); return YES; } -(BOOL)documentInteractionController:(UIDocumentInteractionController *)controller performAction:(nullable SEL)action{ // NSLog(@"13 %s", __func__); return YES; } -(void)documentInteractionControllerWillPresentOptionsMenu:(UIDocumentInteractionController *)controller{ // 页面显示后响应 NSLog(@"9 %s", __func__); } -(void)documentInteractionControllerDidDismissOptionsMenu:(UIDocumentInteractionController *)controller{ // 取消时响应 NSLog(@"10 %s", __func__); } // 返回预览的控制器 -(UIViewController *)documentInteractionControllerViewControllerForPreview:(UIDocumentInteractionController *)controller{ NSLog(@"1 %s", __func__); return self; } // 返回预览视图 -(UIView *)documentInteractionControllerViewForPreview:(UIDocumentInteractionController *)controller{ NSLog(@"2 %s", __func__); return self.view; } // 返回预览视图的frame -(CGRect)documentInteractionControllerRectForPreview:(UIDocumentInteractionController *)controller{ NSLog(@"3 %s", __func__); return self.view.frame; } // 文件分享面板退出时调用 -(void)documentInteractionControllerDidDismissOpenInMenu:(UIDocumentInteractionController *)controller{ NSLog(@"4 %s", __func__); NSLog(@"dismiss"); } // 文件分享面板弹出的时候调用 -(void)documentInteractionControllerWillPresentOpenInMenu:(UIDocumentInteractionController *)controller{ NSLog(@"5 %s", __func__); NSLog(@"WillPresentOpenInMenu"); } // 当选择一个文件分享App的时候调用 -(void)documentInteractionController:(UIDocumentInteractionController *)controller willBeginSendingToApplication:(nullable NSString *)application{ NSLog(@"6 %s", __func__); NSLog(@"begin send : %@", application); } // Preview presented/dismissed on document. Use to set up any HI underneath. -(void)documentInteractionControllerWillBeginPreview:(UIDocumentInteractionController *)controller{ NSLog(@"7 %s", __func__); } // 完成时响应 -(void)documentInteractionControllerDidEndPreview:(UIDocumentInteractionController *)controller{ NSLog(@"8 %s", __func__); } -(void)documentInteractionController:(UIDocumentInteractionController *)controller didEndSendingToApplication:(nullable NSString *)application{ NSLog(@"11 %s", __func__); }
|