4

Is there a way to open a file with QLPreviewController or UIDocumentInteractionController, knowing its UTI, but without a file extension in the NSURL? Thanks for your help!

4

2 回答 2

9

我刚刚找到了另一种处理它的方法。实现具有以下属性的项目:

@interface QuickLookPreviewItem : NSObject <QLPreviewItem>
@property (nonatomic, strong) NSURL *url;
@property (nonatomic, strong) NSString *title;
@property (nonatomic, strong) NSString *uti;
@end

@implementation QuickLookPreviewItem
- (NSString *)previewItemTitle { return self.title; }
- (NSURL *)previewItemURL { return self.url; }
- (NSString *)previewItemContentType { return self.uti; }
@end

尽管尚不清楚它在文档中是否以这种方式工作。

于 2012-11-15T13:27:17.317 回答
0

在快速查看的同时将文件扩展名添加到路径:) 推送之前 => 在 pop 之后添加扩展名 => 再次删除它

于 2012-11-11T15:23:59.787 回答