简体   繁体   English

如何在iPhone应用程序中将Webview映射到Apple Watch应用程序

[英]How to map a webview in iPhone app to an Apple Watch app

I am new to apple watch development. 我是Apple Watch开发的新手。 I have a web view in my iOS app. 我的iOS应用中有网络视图。 How can I map this web view to my Apple Watch app? 如何将该网络视图映射到我的Apple Watch应用程序?

You can't have a webView on the watch. 您的手表上不能有webView。 The recommended thing to do is handoff your URL so they can open it at the iPhone. 推荐的方法是移交您的URL,以便他们可以在iPhone上打开它。

Check: http://www.fiveminutewatchkit.com/blog/2015/3/23/how-to-use-handoff-in-your-watchkit-app 检查: http//www.fiveminutewatchkit.com/blog/2015/3/23/how-to-use-handoff-in-your-watchkit-app

On WatchKit you have WKInterfaceMap class that allows to display a non-interactive snapshot map (rendered on the device and displayed on the Watch). 在WatchKit上,您具有WKInterfaceMap类,该类允许显示非交互式快照地图(呈现在设备上并显示在Watch上)。 Also you can add up to 5 annotations, a tap on the map opens Maps application on Watch 另外,您最多可以添加5个注释,点击地图即可在Watch上打开Maps应用程序

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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