在iOS中显示Powerpoint演示文稿 [英] Show Powerpoint Presentation in iOS

查看:455
本文介绍了在iOS中显示Powerpoint演示文稿的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用程序中,我有dropbox实现,用户可以从dropbox下载文档,并像幻灯片一样逐一查看。我的问题是,如果用户下载.ppt文件,那么如何在iPhone上显示带有所有动画的powerpoint演示文稿而不使用其他应用程序,如幻灯片鲨鱼。

In my app I have dropbox implementation and user can download the documents from dropbox and see that one by one like a slideshow. My Problem is that if user downloads .ppt file then how to show powerpoint presentation with all its animations on iPhone without using other app like slide shark.

推荐答案

唯一的方法是使用快速查看框架

使用快速查看框架,以提供您未处理的格式的项目预览 - 例如iWork或 Microsoft Office 。此框架使您可以更好地控制预览过程,而不是从 UIDocumentInteractionController 类中获取 - 包括选择预览是在导航控制器的上下文中显示还是以模态方式显示(全屏) )。此框架中的主要类是QLPreviewController,它提供用于预览项目的专用视图。它依赖于委托调解预览操作,以及用于提供预览项目的数据源。

Use the Quick Look framework to provide previews of items that are in formats you don’t handle—such as iWork or Microsoft Office. This framework affords you more control over the preview process than you get from the UIDocumentInteractionController class—including choosing whether the preview is displayed in the context of a navigation controller or modally (full screen). The primary class in this framework is QLPreviewController, which provides a specialized view for previewing an item. It relies on a delegate for mediating preview actions, and a data source for providing the preview items.

In iOS 4.2 以及之后,Quick Look预览控制器提供的专用视图包括带有Print项目的操作按钮。如果控制器可以提供文件的预览,它也可以打印它。没有打印代码供您编写。

In iOS 4.2 and later, the specialized view presented by a Quick Look preview controller includes an action button with a Print item. If the controller can provide a preview of a file, it can also print it. There is no printing code for you to write.

要显示Quick Look预览控制器,您可以使用以下任何选项:


  1. 使用 UINavigationController 对象将其推入视图。

  2. 模态,全屏显示,使用
    presentModalViewController:animated:其父类的方法,
    UIViewController

  3. 提交文档交互控制器(如
    预览和打开文件中所述。)然后用户可以调用Quick
    Look通过从文档
    交互控制器的选项菜单中选择快速查看来预览控制器。

  1. Push it into view using a UINavigationController object.
  2. Present it modally, full screen, using the presentModalViewController:animated: method of its parent class, UIViewController.
  3. Present a document interaction controller (as described in "Previewing and Opening Files." The user can then invoke a Quick Look preview controller by choosing Quick Look from the document interaction controller’s options menu.

快速查看预览控制器可以显示预览以下项目:

A Quick Look preview controller can display previews for the following items:


Microsoft Office文档(Office '97及更新版本)

iWork文件

富文本格式(RTF)文档s

Rich Text Format (RTF) documents

PDF文件

图片

正文统一类型标识符(UTI)符合
public.text类型的文件(请参阅统一类型标识符参考)

Text files whose uniform type identifier (UTI) conforms to the public.text type (see Uniform Type Identifiers Reference)

逗号分隔值(csv)文件

Comma-separated value (csv) files

这篇关于在iOS中显示Powerpoint演示文稿的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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