tzi

TZImagePreviewController

对TZImagePickerController库的增强,支持用UIImage、NSURL预览照片和用NSURL预览视频。

Showing:

Popularity

Downloads/wk

0

GitHub Stars

86

Maintenance

Last Commit

9mos ago

Contributors

3

Package

Dependencies

1

License

MIT

Categories

Readme

TZImagePreviewController

CocoaPods

Enhance the TZImagePickerController library, supports to preview photo by UIImage or NSURL and preview video by NSURL.
TZImagePickerController库的增强,支持用UIImage、NSURL预览照片和用NSURL预览视频。

一. Installation 安装

CocoaPods

pod 'TZImagePreviewController'

手动安装

将TZImagePickerController文件夹拽入项目中,导入头文件:#import "TZImagePreviewController.h"

二. Example 例子

TZImagePreviewController *previewVc = [[TZImagePreviewController alloc] initWithPhotos:self.selectedPhotos currentIndex:indexPath.row tzImagePickerVc:[self createTZImagePickerController]];
[previewVc setBackButtonClickBlock:^(BOOL isSelectOriginalPhoto) {
    NSLog(@"back isSelectOriginalPhoto:%d", isSelectOriginalPhoto);
}];
[previewVc setSetImageWithURLBlock:^(NSURL *URL, UIImageView *imageView) {
    [imageView sd_setImageWithURL:URL];
}];
[previewVc setDoneButtonClickBlock:^(NSArray *photos, BOOL isSelectOriginalPhoto) {
    self.selectedPhotos = [NSMutableArray arrayWithArray:photos];
    NSLog(@"done isSelectOriginalPhoto:%d photos.count:%zd", isSelectOriginalPhoto, photos.count);
    [self.collectionView reloadData];
}];
[self presentViewController:previewVc animated:YES completion:nil];

三. Requirements 要求

iOS 8 or later. Requires ARC
iOS8及以上系统可使用. ARC环境.

四. More 更多

There is Demo inside, Please refer to Demo for usage.
内有Demo,请参考Demo进行使用。

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100