混合iOS Web和本机应用程序事件的通信 [英] Hybrid iOS web and native app event's communication

查看:188
本文介绍了混合iOS Web和本机应用程序事件的通信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种混合应用程序开发策略。我读了一些策略,但是其中一种策略通常用于将Webview放在导航控制器中。因此,导航将通过本机应用程序完成,但其余可见区域将与html Web有关。

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/

我的问题是,是否有可能从javascript传达到本地事件。我有相反的看法,因为它是在phonegap中实现的,但是我没有发现javascript函数正在调用一些本机代码事件。

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.

推荐答案

是的,有可能。我相信您的问题已经得到回答,并且在以下SO问题中提供了到外部资源的链接:

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桥

如何从Javascript调用Objective-C?

如何从Javascript调用Objective C方法并将数据发送回iOS中的Javascript?

使用UIWebView从HTML代码中调用目标C代码中的方法

免责声明:我不确定是否这可以作为答案,但是似乎我的声誉不允许我写评论,所以他我们走了。

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.

这篇关于混合iOS Web和本机应用程序事件的通信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆