是否可以在UIWebView中使用iframe? [英] is it possible to use iframe in UIWebView?

查看:155
本文介绍了是否可以在UIWebView中使用iframe?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的应用中添加一个像facebook一样的按钮。在developer.facebook.com中我对此无能为力。是否可以使用facebook创建的iframe,如UIWebView中的按钮?它认为如果它可能,那么我可以在我的应用程序中添加使用该iframe的UIWebView。感谢名单。请写一些示例代码。

i want to add a facebook like button in my app. in developer.facebook.com i couldn't fine anything about that. is it possible to use iframe created by facebook like button in UIWebView? it think if its possible then i can add a UIWebView in my app which use that iframe. thanx. please write some example code.

推荐答案

是的,您可以在webview中使用iframe。您需要使用HTML字符串加载webview。如果您通过网络搜索,您还可以找到iframe的HTML相关代码。此外,您还可以在webview中使用javascript,使用方法 stringByEvaluatingJavaScript :UIWebview。

Yes that is possible you can use the iframe in webview. You need to load the webview with the HTML string. You can also find the related code of HTML for iframe if you search over the net. Moreover you can also use javascript, in webview using the method stringByEvaluatingJavaScript: of UIWebview.

这篇关于是否可以在UIWebView中使用iframe?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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