I need to open UIDocumentPickerViewController
and It should allow user to select all type of files. ie.(.pdf,.doc)files I used UIDocumentPickerViewControl
Actually, instead of WebView you could also use the QuickLook Framework, which is designed for this specific purpose. You just pass the location of the file and conform to the protocols. It will present a view controller with the document inside.
It supports the following file:
- iWork documents (Pages, Numbers and Keynote)
- Microsoft Office documents (as long as they’ve been created with Office 97 or any other newer version)
- PDF files
- Images
- Text files
- Rich-Text Format documents
- Comma-Separated Value files (csv)
Here is a tutorial by APPCODA, that describes the same.
and
Here is the tutorial provided by Apple OBJ-C version.