diff --git a/iOS/Article/ArticleViewController.swift b/iOS/Article/ArticleViewController.swift index 0888355f3..585178f01 100644 --- a/iOS/Article/ArticleViewController.swift +++ b/iOS/Article/ArticleViewController.swift @@ -123,8 +123,6 @@ class ArticleViewController: UIViewController { webView.navigationDelegate = self webView.uiDelegate = self - webView.addInteraction(UIContextMenuInteraction(delegate: self)) - webView.configuration.userContentController.add(WrapperScriptMessageHandler(self), name: MessageName.imageWasClicked) webView.configuration.userContentController.add(WrapperScriptMessageHandler(self), name: MessageName.imageWasShown) @@ -350,36 +348,6 @@ extension ArticleViewController: InteractiveNavigationControllerTappable { } } -// MARK: UIContextMenuInteractionDelegate - -extension ArticleViewController: UIContextMenuInteractionDelegate { - func contextMenuInteraction(_ interaction: UIContextMenuInteraction, configurationForMenuAtLocation location: CGPoint) -> UIContextMenuConfiguration? { - - return UIContextMenuConfiguration(identifier: nil, previewProvider: nil) { suggestedActions in - let action1 = UIAction(title: "Action 1", image: AppAssets.infoImage) { [weak self] action in - } - let action2 = UIAction(title: "Action 2", image: AppAssets.infoImage) { [weak self] action in - } - let action3 = UIAction(title: "Action 3", image: AppAssets.infoImage) { [weak self] action in - } - let action4 = UIAction(title: "Action 4", image: AppAssets.infoImage) { [weak self] action in - } - let action5 = UIAction(title: "Action 5", image: AppAssets.infoImage) { [weak self] action in - } - let action6 = UIAction(title: "Action 6", image: AppAssets.infoImage) { [weak self] action in - } - let action7 = UIAction(title: "Action 7", image: AppAssets.infoImage) { [weak self] action in - } - return UIMenu(title: "", children: [action1, action2, action3, action4, action5, action6, action7]) - } - } - - func contextMenuInteraction(_ interaction: UIContextMenuInteraction, previewForHighlightingMenuWithConfiguration configuration: UIContextMenuConfiguration) -> UITargetedPreview? { - return UITargetedPreview(view: webView, parameters: CroppingPreviewParameters(view: webView, size: CGSize(width: webView.bounds.width, height: 200))) - } - -} - // MARK: WKNavigationDelegate extension ArticleViewController: WKNavigationDelegate { diff --git a/iOS/UIKit Extensions/CroppingPreviewParameters.swift b/iOS/UIKit Extensions/CroppingPreviewParameters.swift index c99f6e404..58a19dfbf 100644 --- a/iOS/UIKit Extensions/CroppingPreviewParameters.swift +++ b/iOS/UIKit Extensions/CroppingPreviewParameters.swift @@ -17,11 +17,4 @@ class CroppingPreviewParameters: UIPreviewParameters { self.visiblePath = visiblePath } - init(view: UIView, size: CGSize) { - super.init() - let newBounds = CGRect(x: 0, y: 0, width: size.width, height: size.height) - let visiblePath = UIBezierPath(roundedRect: newBounds, cornerRadius: 10) - self.visiblePath = visiblePath - } - }