Latest | 0.3.2 |
---|---|
Homepage | https://github.com/xing/AFQuickLookView |
License | MIT |
Platforms | ios 5.0, requires ARC |
Dependencies | AFNetworking |
Frameworks | QuickLook |
Authors |
AFQuickLookView is an extension for AFNetworking that allows the display of remote files in a UIView subclass.
This is still in early stages of development, so proceed with caution when using this in a production application. Any bug reports, feature requests, or general feedback at this point would be greatly appreciated.
Example Usage
Add an instance of the AFQuickLookView to the view of you choosing:
CGRect frame = CGRectMake(0, 100, 300, 300);
AFQuickLookView* quickLookView = [[AFQuickLookView alloc] initWithFrame:frame];
[self.view addSubview:quickLookView];
Trigger loading a remote document:
NSString* fileURLString = @"http://bit.ly/xngAttPDF";
NSURL* fileURL = [NSURL URLWithString:fileURLString];
[quickLookView previewDocumentAtURL:fileURL success:^{
} failure:^(NSError *error) {
NSLog(@"Could not preview document. Error:%@", error);
}];
Supported file formats
- iWork documents
- Microsoft Office documents (Office ’97 and newer)
- Rich Text Format (RTF) documents
- PDF files
- Images
- Text files
- Comma-separated value (csv) files
HTTP layer Details
In order for AFQuickLookView to work with remote files, the server response has to comply to one of these options:
a) include a Content-Type header, e.g.:
Content-Type: application/pdf
b) include the right filename and extension in the Content-Disposition header, i.e.:
Content-Disposition: attachment;filename="examplefile.pdf"
Contact
XING AG
Claudiu-Vlad Ursache
License
AFQuickLookView is available under the MIT license. See the LICENSE file for more info.
Latest podspec
{ "name": "AFQuickLookView", "platforms": { "ios": "5.0" }, "version": "0.3.2", "license": "MIT", "summary": "AFNetworking Extension for document previews of remote files.", "homepage": "https://github.com/xing/AFQuickLookView", "authors": { "Claudiu-Vlad Ursache": "[email protected]" }, "source": { "git": "https://github.com/xing/AFQuickLookView.git", "tag": "0.3.2" }, "source_files": [ "AFQuickLookViewHTTPClient.{h,m}", "AFQuickLookView.{h,m}" ], "requires_arc": true, "frameworks": "QuickLook", "dependencies": { "AFNetworking": [ ">= 0.9.0" ] } }
Mon, 29 Feb 2016 20:27:03 +0000