How to disable iOS 11 and iOS 12 Drag & Drop in WKWebView?
问题 Long-pressing images or links in a WKWebView on iOS 11 and 12 initiates a Drag & Drop session (the user can drag the image or the link). How can I disable that? 回答1: I did find a solution that involves method swizzling but it's also possible to disable drag and drop in a WKWebView without any swizzling. Note: See special notes for iOS 12.2+ below WKContentView — a private subview of WKWebView 's WKScrollView — has an interactions property, just like any other UIView in iOS 11+. That