Seletor参数崩溃

seletor是方法符号,不能带参数。如果指向的方法有参数,方法体里面call这个参数,就会野指针崩溃。正常这种selector方法只能带一个发生者参数。

WKWebView JS监听循环引用

[self.configuration.userContentController addScriptMessageHandler:[WeakProxy sf_weakProxy:target] name:@"img_jsm"];

或者

1
2
3
deinit {
webView.configuration.userContentController.removeAllUserScripts()
}