简体   繁体   中英

Hybrid iOS web and native app event's communication

I am looking for a hybrid app development strategies. I read about some strategies but one of them is commonly used to put webview in a navigation controller. So the navigation would be done via native app but rest of the visible area would relate to html web.

http://venturebeat.com/2011/08/16/linkedin-node/

http://www.nngroup.com/articles/mobile-native-apps/

My question is, is it possible to communicate from javascript to native events. I have reverse of it, as it is implemented in the phonegap but i haven't found javascript functions are calling some native code events.

Please provide some demo links that are implementing apps via hybrid strategy.

Yes, it is possible. I believe your question is already answered and links to external resources are provided within the following SO questions:

iOS JavaScript bridge

How to call Objective-C from Javascript?

How to invoke Objective C method from Javascript and send back data to Javascript in iOS?

Invoke method in objective c code from HTML code using UIWebView

Disclaimer: I am not sure if this qualifies as an answer, but it seems my reputation does not allow me to write comments, so here we go.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM