HTML / Javascript中的本机iPhone应用程序? [英] Native iPhone app in HTML/Javascript?

查看:97
本文介绍了HTML / Javascript中的本机iPhone应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想建立一个严重依赖Google地图的应用程序。是否可以在HTML / Javascript中编写本机iPhone应用程序?如果是这样,它会从应用程序商店访问吗?否则,我该如何将Google地图包含在本地应用程序中?解析方案

您需要在Objective-C中构建一个框架应用程序包含一个 UIWebView 。您可以使用HTML / Javascript填充 UIWebView 在我看来,更好的选择是使用 MapKit 框架 。 MapKit让您可以使用完整的 Google Maps API 我认为本机应用程序在设备上的工作效率始终优于 UIWebView 容器应用程序。



我使用过MapKit 我的应用程序,并发现它很容易使用,性能不错。在链接的示例中,我在页面模式下将 MkMapView 嵌入到 UIScrollView 中。我怀疑你会很容易地用一个 UIWebView 来实现这一点,我相信它不会表现得很好。


I would like to build an app that heavily relies on Google Maps. Is it possible to write a native iPhone application in HTML/Javascript ? If so, will it be accessible from the app store ? Otherwise, how could I include Google Maps in a native app ?

解决方案

You will need to build a framework application in Objective-C that contains a UIWebView. You can populate the UIWebView with your HTML/Javascript.

In my opinion the better alternative is to use the MapKit framework from a native app. MapKit lets you do almost everything you can do using the full Google Maps API and I think a native app will always work better on the device than a UIWebView container app.

I have used MapKit in a few of my apps and found it easy to use with nice performance. In the linked example I embed a MkMapView in a UIScrollView in page mode. I doubt you would have an easy time implementing this with a UIWebView and I am sure it wouldn't perform as well.

这篇关于HTML / Javascript中的本机iPhone应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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