ile WKWebView çalışmıyor i "şöyle bir WKWebView üzerinde uzun basın jest tanıyıcıyı uygulamaya çalışıyorum:iOS8 jest tanıyıcı hızlı
var webView: WKWebView?
let longPressRecognizer = UILongPressGestureRecognizer()
override func loadView() {
super.loadView()
var webViewConfig: WKWebViewConfiguration = WKWebViewConfiguration()
webViewConfig.allowsInlineMediaPlayback = true
webViewConfig.mediaPlaybackRequiresUserAction = false
self.webView = WKWebView(frame: self.view.frame, configuration: webViewConfig)
self.view = self.webView!
//hook the long press event
longPressRecognizer.addTarget(self, action: "onLongPress:")
self.webView!.scrollView.addGestureRecognizer(longPressRecognizer)
}
func onLongPress(gestureRecognizer:UIGestureRecognizer){
NSLog("long press detected")
}
i bir hata alamadım ama yapmak gibi olamaz o onLongPress işlevini tetikler.
bu deneyin: https://github.com/theniceboy/HoldToSaveImage – David