如何使用Appcelerator在iOS上使用iBooks打开PDF?
问题描述:
我想在我的应用程序中使用ibooks打开pdf,但是我找不到任何解决方案。我正在使用Appcelerator。请与我分享代码。如何使用Appcelerator在iOS上使用iBooks打开PDF?
答
您可以使用DocumentViewear(http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.iOS.DocumentViewer) 或Web视图来显示PDF。 当您在DocumentViewer中打开PDF时,用户可以决定 使用操作按钮在他想要的阅读器中打开PDF。
要打开,你必须使用的URL方案 (http://wiki.akosma.com/IPhone_URL_Schemes#iBooks)其他应用:
Titanium.Platform.openURL('ibooks://');
非常感谢您的回复。您能否告诉我我应该为pdf提供哪些网址?例如,Titanium.Platform.openURL('ibooks://'+ PDFURL) – user2968668