QLPreviewController VS UIWebView in terms of render efficience and memory usage - ios

I am working on an iPad project which lets users browse local docs, ppts, pdfs and etc..
I have two options to display these files:
First, I can use UIWebView to display them;
Alternatively, I can use QLPreviewController to display them.
From ActivityConsole, I figure out that when I use UIWebView to display a 8.6M PPT, my app's process costs as following:
However, when I use QLPreviewController to display the same PPT, there will be two process as following:
I think the "quicklookd" process is a helper process launched by the QuickLook Framework.
As I see, the overall memory usage is about the same, but using QLPreviewController can cut down the memory usage of my App ( It is proved in Instruments ). So I think the display of doc can be more smooth and fast by using QLPreviewController. However, when I test these two approches in iPad1, iOS 5.1.1, I found out that the render effcience of QLPreviewController is lower than UIWebView. The scrolling of the ppt chokes much more in QLPreviewController.
Can anyone explain the underlying implement of QLPreviewController render process? And which is the better choice to display docs?
Or is there a better approach to display docs except above approches?
Thank you for any help!

Related

Displaying both video and image in a single view element

I'm attempting to create an Instagram styled app and cannot figure out a way to display media in a UITableView the way they do (either video or image in a single view). I know it most likely is a custom implementation of UIWebView or something of the sort, however I have no idea where to even begin writing a subclass like that. Things I've already tried include:
Using a UIWebView (massive memory leak, even when adding/removing the views programmatically).
Adding either UIImageView or UIWebView depending on whether or not it was a video or image (again had a memory leak)
Searching the internet for a possible way to do this
If anyone could help me out that would be awesome! FYI the media I am using is grabbed straight from my server, there is no data being gathered from a popular source such as YouTube, Flickr, etc.
i think they use UICollectionview as it allows for better customization of a table.
In terms of images and videos, use UIImageView to display all your images and MPMoviePlayerController to play videos.

Displaying ppt interactively on iOS device

I have browsed and searched a lot for this but couldn't find any relevant answers/posts. I am looking for a framework/library with the help of which I can convert ppt slides into images and then render them on iOS device. Any other way/procedure which will display ppt page-wise with giving control on page transition will also be great.
Thanks in advance
If you just want to view the Office files, have a look at:
Document Interaction Programming Topics for iOS: Quick Look Framework.
Quick Look Framework Reference
Quick Look Framework supports a lot of file formats as you can see in the links above. It is available in iOS 4.0 and later.
You can also use UIWebView to display them. See Using UIWebView to display select document types.

Render PPT files in iOS 6

I am developing an application where it will load Power point presentation file in UIWebView and capture the screen of the UIWebView for each page. And I am able to display as images one by one like a presentation.
Targetted platforms are: iOS6, iOS7
(1) Now when I want to display a Power Point document that has slides with multiple layered images/ elements or slides with animation
(2) Ppt files with custom size of slides
are not properly rendered by UIWebView. And hence I am seeing those slides in a different alignment and orientation. Basically not able to display as original images.
I searched in Google, Stack Overflow and even Apple documentation. Nowhere documented that this is not possible. Is there any other approach for loading ppt files where I will not lose any content or alignment?
SlideShark or Key Note are the apps which will display ppts as if original ppt slides.
Follow App Guidelines for UIDocumentInteractionController
Documentation
Sample Code
I think this will help you.
You can check file support using QLPreviewController here.

Use the modal view displayed by UIDocumentInteractionController

I've been thinking about the following possibility:
I am right now developing an app for displaying a different set of files(could be different formats), and use the content of these files to form 1 single file.
Because UIDocumentInteractionController could show content of formats that otherwise can't be viewed by my app(docx for example), wouldn't it be nice that I capture the modal view displayed by this controller and use it somewhere else?
I am wondering how can I access the content of presented UIDocumentInteractionController and capture it.
Any advice would be nice, thank you.
Screenshot - Maybe I could do a screenshot of presentedViewController.view, but the resolution of captured image isn't ideal - limited to the screen resolution and not high enough to be viewed on a computer monitor.

how to embed flash/SWF animation in startup screen in IOS app?

i wanna to embed an animated logo in the application startup screen, this logo is already done in 2 formats of files SWF and Flash, my question is about how to embed these files directly in the application startup screen, such that the animated logo appears directly on the startup screen.
Appreciate your concern,
Thanks in advance
This is not possible. iOS does not support Flash.
Update: to follow up with a possible solution, since your Flash is just an animation, perhaps you can just render it to a video and use that instead?
First off, your start-up screen is a static image ("Default.png")... so you can't do animated stuff there.
Once your app fully starts up and the static image disappears, then you could have something animated.
In a practical sense, it can not be Flash or a SWF though (Flash files are SWF files, by the way). One can build Flash-based apps for iOS using Adobe AIR, but that's a full blown environment and IDE separate from Xcode.
It'd be smarter to do your start-up animation using CoreAnimation, HTML5 or some other fine animating framework (Unity, Cocos2d or whatever).
Or a separate video file (in which case the user has minimal interaction possibilities). But +1 to Darren for suggesting this answer faster than I could think of it.
If you are planning to publish your app on the AppStore, then what you are trying to do is Impossible !
Your best option is to create the animation you want using Core animation or you can simply convert that animation to a video and play it once your app is loaded.

Resources