//
//  PreOCviewController.m
//  MobilePortal
//
//  Created by caiyang on 2021/4/7.
//  Copyright © 2021 yin chen. All rights reserved.
//

#import "PreOCviewController.h"
@interface PreOCviewController ()<QLPreviewControllerDelegate,QLPreviewControllerDataSource>

@end

@implementation PreOCviewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.delegate = self;
    self.dataSource = self;
    
    // Do any additional setup after loading the view.
}
-(void)loadUrlPath:(NSURL *)fileUrl{
    if ([PreOCviewController canPreviewItem:fileUrl]) {
        [self.fileUrlList addObject:fileUrl];
    }
}
- (NSInteger)numberOfPreviewItemsInPreviewController:(QLPreviewController *)controller{
    return self.fileUrlList.count;
}
- (id<QLPreviewItem>)previewController:(QLPreviewController *)controller previewItemAtIndex:(NSInteger)index{
    return self.fileUrlList[index];
}
@end
