P粉4935341052023-08-16 00:22:29
像这样调用函数:
func setCompleteAdInJavaScript() { let javascriptFunction = """ gameState.setCredits('200'); """ webView.evaluateJavaScript(javascriptFunction) { result, error in if let _ = error { print("设置积分出错") } else { print("成功设置积分。") } } }