Rollback POC code that shouldn't have gotten added
This commit is contained in:
parent
88707517e8
commit
06d3c35206
|
@ -123,8 +123,6 @@ class ArticleViewController: UIViewController {
|
||||||
webView.navigationDelegate = self
|
webView.navigationDelegate = self
|
||||||
webView.uiDelegate = 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.imageWasClicked)
|
||||||
webView.configuration.userContentController.add(WrapperScriptMessageHandler(self), name: MessageName.imageWasShown)
|
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
|
// MARK: WKNavigationDelegate
|
||||||
|
|
||||||
extension ArticleViewController: WKNavigationDelegate {
|
extension ArticleViewController: WKNavigationDelegate {
|
||||||
|
|
|
@ -17,11 +17,4 @@ class CroppingPreviewParameters: UIPreviewParameters {
|
||||||
self.visiblePath = visiblePath
|
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
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue