I develop Xamarin Forms app. And I use QLPreviewController for ios. I want to close copy text/text share, if document has text. Is it possible and how? I searched it as native. Some sources redirect me to UIDocumentInteractionControllerDelegate. But I didn't understand how can i do it.
Thanks in advance.
Edit: My UIDocumentInteractionController implementation:
var firstController = UIApplication.SharedApplication.KeyWindow.RootViewController.ChildViewControllers.First().ChildViewControllers.Last().ChildViewControllers.First();
var navcontroller = firstController as UINavigationController;
var uidic = UIDocumentInteractionController.FromUrl(new NSUrl(file, true));
uidic.Delegate = new DocInteractionController(navcontroller);
uidic.PresentPreview(true);
public class DocInteractionController : UIDocumentInteractionControllerDelegate
{
UINavigationController navigationController;
public DocInteractionController(UINavigationController _navigationController)
{
navigationController = _navigationController;
}
}

In your case it would be better to use WebView to preview files like pdf .
In forms
Create a custom webview
in Android project
in iOS project
in xaml
Now you can use it in xaml like (you could open a new ContentPage that contains the WebView)