ios uses WKwebview, but if you want to return parameters to js, you need to call back the js method, and I think you can dispatch the parameters in the react component. Now I don"t know how to write the js method to call ios and return parameters
ios uses WKwebview, but if you want to return parameters to js, you need to call back the js method, and I think you can dispatch the parameters in the react component. Now I don"t know how to write the js method to call ios and return parameters
have you solved it? Now I also encounter the situation that I need to adjust each other with ios. Io or Android can never be called when calling the internal methods of my react component. It seems that I can't access the internal methods of the component. They can be called if written in the index.html file. How did you solve it, please?
has not done iOS development, do not know the native details, according to your question should be able to call the JS method in WKwebview. In this way, you can bind the this scope of the React component to the callback method, and then you can access the component state on the callback method.
for example:
function callback(data){
// bind this
// state
this.setState({ hello: data })
}
...
class someComponent extends React.Component {
constructor(){
super();
this.state = { hello: "123" }
callback = callback.bind(this);
}
...
}
topic description this.props.name is not displayed, but the event triggered by onclick is valid, which changes the value of name to ls . < H1 > written as class class cannot be fetched < H1 > import {observable,action,computed} from mobx cl...
fixed the compatible code of click-through problem in ios fix touch to scroll background page on iOS https: github.com ant-design ant-design-mobile issues 307 https: github.com ant-design ant-design-mobile issues 163 const isIPhone = new Reg...
< textarea > how to achieve line wrapping display on placeholder on the IOS side? 1. The newline character is used is supported on Android phones, but not on IOS phones? was implemented in this method at first, but it can t be implemented after m...