且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

iOS - 向 Safari 添加菜单项“打开方式"

更新时间:2023-12-04 10:18:46

假设您使用的是 Xcode,请转到您的项目设置,然后选择您的目标.在信息选项卡中,您将添加一个文档类型,将其(doc、xls、txt 等)与您的应用程序相关联.如果您在 safari 中打开该项目,您将看到一个在您的应用程序中打开它的选项.在最新版本的移动 safari 中,我相信在文档顶部会出现一个栏,向您展示此选项,而不是出现在添加书签"弹出窗口中.

Assuming you are using Xcode, go to your project settings, then choose your target. In the Info tab, you would add a Document Type which will associate it (doc, xls, txt, etc) with your application. If you open the item in safari, you will be presented with an option to open it in your app. In recent versions of mobile safari, I believe a bar appears at the top of the document presenting you with this option as opposed to appearing in the 'Add Bookmark' popover.

这是一些详细信息.